# star Icon

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

- Library: [Material Icons](https://composables.com/icons/icon-libraries/material-icons.md)
- License: Apache 2.0 (full text in the [Material Icons library page](https://composables.com/icons/icon-libraries/material-icons.md))
- Styles: [Filled](https://composables.com/icons/icon-libraries/material-icons/star.md?v=filled), [Outlined](https://composables.com/icons/icon-libraries/material-icons/star.md?v=outlined), [Rounded](https://composables.com/icons/icon-libraries/material-icons/star.md?v=rounded), [Sharp](https://composables.com/icons/icon-libraries/material-icons/star.md?v=sharp), [Two-Tone](https://composables.com/icons/icon-libraries/material-icons/star.md?v=twotone)
- Categories: [Toggle](https://composables.com/icons/categories/toggle.md)

## Compose ImageVector (Kotlin)

For Jetpack Compose and Compose Multiplatform. Download: `https://composables.com/download/icons/material-icons/star.kt`

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

val MaterialIconsStar: ImageVector
    get() {
        if (_MaterialIconsStar != null) return _MaterialIconsStar!!
        
        _MaterialIconsStar = ImageVector.Builder(
            name = "star",
            defaultWidth = 24.dp,
            defaultHeight = 24.dp,
            viewportWidth = 24f,
            viewportHeight = 24f
        ).apply {
            group {
                path(
                    fill = SolidColor(Color.Transparent)
                ) {
                    moveTo(0f, 0f)
                    horizontalLineToRelative(24f)
                    verticalLineToRelative(24f)
                    horizontalLineTo(0f)
                    verticalLineTo(0f)
                    close()
                }
                path(
                    fill = SolidColor(Color.Transparent)
                ) {
                    moveTo(0f, 0f)
                    horizontalLineToRelative(24f)
                    verticalLineToRelative(24f)
                    horizontalLineTo(0f)
                    verticalLineTo(0f)
                    close()
                }
            }
            group {
                path(
                    fill = SolidColor(Color.Black)
                ) {
                    moveTo(12f, 17.27f)
                    lineTo(18.18f, 21f)
                    lineToRelative(-1.64f, -7.03f)
                    lineTo(22f, 9.24f)
                    lineToRelative(-7.19f, -0.61f)
                    lineTo(12f, 2f)
                    lineTo(9.19f, 8.63f)
                    lineTo(2f, 9.24f)
                    lineToRelative(5.46f, 4.73f)
                    lineTo(5.82f, 21f)
                    lineTo(12f, 17.27f)
                    close()
                }
            }
        }.build()
        
        return _MaterialIconsStar!!
    }

private var _MaterialIconsStar: ImageVector? = null
```

## Android Vector Drawable (XML)

Download: `https://composables.com/download/icons/material-icons/star.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:pathData="M0,0h24v24H0V0Z" />
    <path
        android:pathData="M0,0h24v24H0V0Z" />
    <path
        android:fillColor="@android:color/black"
        android:pathData="M12,17.27L18.18,21l-1.64,-7.03L22,9.24l-7.19,-0.61L12,2L9.19,8.63L2,9.24l5.46,4.73L5.82,21L12,17.27Z" />
</vector>
```

## SVG

Download: `https://composables.com/download/icons/material-icons/star.svg`

```svg
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" viewBox="0 0 24 24" fill="currentColor"><g><path d="M0,0h24v24H0V0z" fill="none"/><path d="M0,0h24v24H0V0z" fill="none"/></g><g><path d="M12,17.27L18.18,21l-1.64-7.03L22,9.24l-7.19-0.61L12,2L9.19,8.63L2,9.24l5.46,4.73L5.82,21L12,17.27z"/></g></svg>
```
