# pencil-square Icon

> The pencil-square icon from Heroicons as Compose ImageVector Kotlin code, Android Vector Drawable XML and SVG.

- Library: [Heroicons](https://composables.com/icons/icon-libraries/heroicons.md)
- License: MIT (full text in the [Heroicons library page](https://composables.com/icons/icon-libraries/heroicons.md))
- Styles: [Outline](https://composables.com/icons/icon-libraries/heroicons/pencil-square.md?v=outline), [Solid](https://composables.com/icons/icon-libraries/heroicons/pencil-square.md?v=solid), [Mini](https://composables.com/icons/icon-libraries/heroicons/pencil-square.md?v=mini), [Micro](https://composables.com/icons/icon-libraries/heroicons/pencil-square.md?v=micro)

## Compose ImageVector (Kotlin)

For Jetpack Compose and Compose Multiplatform. Download: `https://composables.com/download/icons/heroicons/pencil-square.kt`

```kotlin
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.graphics.StrokeJoin
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.graphics.vector.path
import androidx.compose.ui.unit.dp

val HeroiconsPencilSquare: ImageVector
    get() {
        if (_HeroiconsPencilSquare != null) return _HeroiconsPencilSquare!!
        
        _HeroiconsPencilSquare = ImageVector.Builder(
            name = "pencil-square",
            defaultWidth = 24.dp,
            defaultHeight = 24.dp,
            viewportWidth = 24f,
            viewportHeight = 24f
        ).apply {
            path(
                fill = SolidColor(Color.Transparent),
                stroke = SolidColor(Color.Black),
                strokeLineWidth = 1.5f,
                strokeLineJoin = StrokeJoin.Miter
            ) {
                moveTo(16.862f, 4.487f)
                lineToRelative(1.687f, -1.688f)
                arcToRelative(1.875f, 1.875f, 0f, true, true, 2.652f, 2.652f)
                lineTo(10.582f, 16.07f)
                arcToRelative(4.5f, 4.5f, 0f, false, true, -1.897f, 1.13f)
                lineTo(6f, 18f)
                lineToRelative(0.8f, -2.685f)
                arcToRelative(4.5f, 4.5f, 0f, false, true, 1.13f, -1.897f)
                lineToRelative(8.932f, -8.931f)
                close()
                moveToRelative(0f, 0f)
                lineTo(19.5f, 7.125f)
                moveTo(18f, 14f)
                verticalLineToRelative(4.75f)
                arcTo(2.25f, 2.25f, 0f, false, true, 15.75f, 21f)
                horizontalLineTo(5.25f)
                arcTo(2.25f, 2.25f, 0f, false, true, 3f, 18.75f)
                verticalLineTo(8.25f)
                arcTo(2.25f, 2.25f, 0f, false, true, 5.25f, 6f)
                horizontalLineTo(10f)
            }
        }.build()
        
        return _HeroiconsPencilSquare!!
    }

private var _HeroiconsPencilSquare: ImageVector? = null
```

## Android Vector Drawable (XML)

Download: `https://composables.com/download/icons/heroicons/pencil-square.xml`

```xml
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="24"
    android:viewportHeight="24">
    <path
        android:strokeColor="@android:color/black"
        android:strokeWidth="1.5"
        android:pathData="m16.862,4.487l1.687,-1.688a1.875,1.875 0 1,1 2.652,2.652L10.582,16.07a4.5,4.5 0 0,1 -1.897,1.13L6,18l0.8,-2.685a4.5,4.5 0 0,1 1.13,-1.897l8.932,-8.931Zm0,0L19.5,7.125M18,14v4.75A2.25,2.25 0 0,1 15.75,21H5.25A2.25,2.25 0 0,1 3,18.75V8.25A2.25,2.25 0 0,1 5.25,6H10" />
</vector>
```

## SVG

Download: `https://composables.com/download/icons/heroicons/pencil-square.svg`

```svg
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon"><path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"/></svg>
```
