# battery Icon

> The battery icon from Lucide as Compose ImageVector Kotlin code, Android Vector Drawable XML and SVG.

- Library: [Lucide](https://composables.com/icons/icon-libraries/lucide.md)
- License: ISC (full text in the [Lucide library page](https://composables.com/icons/icon-libraries/lucide.md))
- Categories: [Connectivity](https://composables.com/icons/categories/connectivity.md), [Devices](https://composables.com/icons/categories/device.md)

## Compose ImageVector (Kotlin)

For Jetpack Compose and Compose Multiplatform. Download: `https://composables.com/download/icons/lucide/battery.kt`

```kotlin
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.graphics.StrokeCap
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 LucideBattery: ImageVector
    get() {
        if (_LucideBattery != null) return _LucideBattery!!
        
        _LucideBattery = ImageVector.Builder(
            name = "battery",
            defaultWidth = 24.dp,
            defaultHeight = 24.dp,
            viewportWidth = 24f,
            viewportHeight = 24f
        ).apply {
            path(
                fill = SolidColor(Color.Transparent),
                stroke = SolidColor(Color.Black),
                strokeLineWidth = 2f,
                strokeLineCap = StrokeCap.Round,
                strokeLineJoin = StrokeJoin.Round
            ) {
                moveTo(22f, 14f)
                lineTo(22f, 10f)
            }
            path(
                fill = SolidColor(Color.Transparent),
                stroke = SolidColor(Color.Black),
                strokeLineWidth = 2f,
                strokeLineCap = StrokeCap.Round,
                strokeLineJoin = StrokeJoin.Round
            ) {
                moveTo(4f, 6f)
                horizontalLineTo(16f)
                arcTo(2f, 2f, 0f, false, true, 18f, 8f)
                verticalLineTo(16f)
                arcTo(2f, 2f, 0f, false, true, 16f, 18f)
                horizontalLineTo(4f)
                arcTo(2f, 2f, 0f, false, true, 2f, 16f)
                verticalLineTo(8f)
                arcTo(2f, 2f, 0f, false, true, 4f, 6f)
                close()
            }
        }.build()
        
        return _LucideBattery!!
    }

private var _LucideBattery: ImageVector? = null
```

## Android Vector Drawable (XML)

Download: `https://composables.com/download/icons/lucide/battery.xml`

```xml
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:viewportWidth="24"
    android:viewportHeight="24">
    <path
        android:strokeColor="@android:color/black"
        android:strokeLineCap="round"
        android:strokeLineJoin="round"
        android:strokeWidth="2"
        android:pathData="M22,14L22,10" />
    <path
        android:strokeColor="@android:color/black"
        android:strokeLineCap="round"
        android:strokeLineJoin="round"
        android:strokeWidth="2"
        android:pathData="M4,6H16A2,2 0 0,1 18,8V16A2,2 0 0,1 16,18H4A2,2 0 0,1 2,16V8A2,2 0 0,1 4,6Z" />
</vector>
```

## SVG

Download: `https://composables.com/download/icons/lucide/battery.svg`

```svg
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" ><path d="M 22 14 L 22 10" /><rect x="2" y="6" width="16" height="12" rx="2" /></svg>
```
