# warning Icon

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

- Library: [Material Symbols](https://composables.com/icons/icon-libraries/material-symbols.md)
- License: Apache 2.0 (full text in the [Material Symbols library page](https://composables.com/icons/icon-libraries/material-symbols.md))
- Styles: [Outlined](https://composables.com/icons/icon-libraries/material-symbols/warning.md?v=outlined), [Rounded](https://composables.com/icons/icon-libraries/material-symbols/warning.md?v=rounded), [Sharp](https://composables.com/icons/icon-libraries/material-symbols/warning.md?v=sharp), [Outlined Filled](https://composables.com/icons/icon-libraries/material-symbols/warning.md?v=outlined-filled), [Rounded Filled](https://composables.com/icons/icon-libraries/material-symbols/warning.md?v=rounded-filled), [Sharp Filled](https://composables.com/icons/icon-libraries/material-symbols/warning.md?v=sharp-filled)

## Compose ImageVector (Kotlin)

For Jetpack Compose and Compose Multiplatform. Download: `https://composables.com/download/icons/material-symbols/warning.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.path
import androidx.compose.ui.unit.dp

val MaterialSymbolsWarning: ImageVector
    get() {
        if (_MaterialSymbolsWarning != null) return _MaterialSymbolsWarning!!
        
        _MaterialSymbolsWarning = ImageVector.Builder(
            name = "warning",
            defaultWidth = 24.dp,
            defaultHeight = 24.dp,
            viewportWidth = 960f,
            viewportHeight = 960f
        ).apply {
            path(
                fill = SolidColor(Color.Black)
            ) {
                moveTo(40f, 840f)
                lineToRelative(440f, -760f)
                lineToRelative(440f, 760f)
                horizontalLineTo(40f)
                close()
                moveToRelative(138f, -80f)
                horizontalLineToRelative(604f)
                lineTo(480f, 240f)
                lineTo(178f, 760f)
                close()
                moveToRelative(302f, -40f)
                quadToRelative(17f, 0f, 28.5f, -11.5f)
                reflectiveQuadTo(520f, 680f)
                quadToRelative(0f, -17f, -11.5f, -28.5f)
                reflectiveQuadTo(480f, 640f)
                quadToRelative(-17f, 0f, -28.5f, 11.5f)
                reflectiveQuadTo(440f, 680f)
                quadToRelative(0f, 17f, 11.5f, 28.5f)
                reflectiveQuadTo(480f, 720f)
                close()
                moveToRelative(-40f, -120f)
                horizontalLineToRelative(80f)
                verticalLineToRelative(-200f)
                horizontalLineToRelative(-80f)
                verticalLineToRelative(200f)
                close()
                moveToRelative(40f, -100f)
                close()
            }
        }.build()
        
        return _MaterialSymbolsWarning!!
    }

private var _MaterialSymbolsWarning: ImageVector? = null
```

## Android Vector Drawable (XML)

Download: `https://composables.com/download/icons/material-symbols/warning.xml`

```xml
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="960"
    android:viewportHeight="960">
    <path
        android:fillColor="@android:color/black"
        android:pathData="m40,-120l440,-760l440,760H40Zm138,-80h604L480,240L178,760Zm302,-40q17,0 28.5,-11.5T520,680q0,-17 -11.5,-28.5T480,640q-17,0 -28.5,11.5T440,680q0,17 11.5,28.5T480,720Zm-40,-120h80v-200h-80v200Zm40,-100Z" />
</vector>
```

## SVG

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

```svg
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="currentColor"><path d="m40-120 440-760 440 760H40Zm138-80h604L480-720 178-200Zm302-40q17 0 28.5-11.5T520-280q0-17-11.5-28.5T480-320q-17 0-28.5 11.5T440-280q0 17 11.5 28.5T480-240Zm-40-120h80v-200h-80v200Zm40-100Z"/></svg>
```
