# pencil Icon

> The pencil 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.md?v=outline), [Solid](https://composables.com/icons/icon-libraries/heroicons/pencil.md?v=solid), [Mini](https://composables.com/icons/icon-libraries/heroicons/pencil.md?v=mini), [Micro](https://composables.com/icons/icon-libraries/heroicons/pencil.md?v=micro)

## Compose ImageVector (Kotlin)

For Jetpack Compose and Compose Multiplatform. Download: `https://composables.com/download/icons/heroicons/pencil.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 HeroiconsPencil: ImageVector
    get() {
        if (_HeroiconsPencil != null) return _HeroiconsPencil!!
        
        _HeroiconsPencil = ImageVector.Builder(
            name = "pencil",
            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(6.832f, 19.82f)
                arcToRelative(4.5f, 4.5f, 0f, false, true, -1.897f, 1.13f)
                lineToRelative(-2.685f, 0.8f)
                lineToRelative(0.8f, -2.685f)
                arcToRelative(4.5f, 4.5f, 0f, false, true, 1.13f, -1.897f)
                lineTo(16.863f, 4.487f)
                close()
                moveToRelative(0f, 0f)
                lineTo(19.5f, 7.125f)
            }
        }.build()
        
        return _HeroiconsPencil!!
    }

private var _HeroiconsPencil: ImageVector? = null
```

## Android Vector Drawable (XML)

Download: `https://composables.com/download/icons/heroicons/pencil.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.652L6.832,19.82a4.5,4.5 0 0,1 -1.897,1.13l-2.685,0.8l0.8,-2.685a4.5,4.5 0 0,1 1.13,-1.897L16.863,4.487Zm0,0L19.5,7.125" />
</vector>
```

## SVG

Download: `https://composables.com/download/icons/heroicons/pencil.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.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"/></svg>
```
