# vectorResource

## Functions summary

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/ImageVector` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/ImageVector.Companion.https://developer.android.com/reference/kotlin/androidx/compose/ui/res/vectorResource.composable#(androidx.compose.ui.graphics.vector.ImageVector.Companion).vectorResource(kotlin.Int)(id: @https://developer.android.com/reference/kotlin/androidx/annotation/DrawableRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Load an ImageVector from a vector resource. |

## Functions

### ImageVector.Companion.vectorResource

Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/res/VectorResources.android.kt+function:vectorResource)

```
@Composable
fun ImageVector.Companion.vectorResource(id: @DrawableRes Int): ImageVector
```

Load an ImageVector from a vector resource.

This function is intended to be used for when low-level ImageVector-specific functionality is required. For simply displaying onscreen, the vector/bitmap-agnostic `https://developer.android.com/reference/kotlin/androidx/compose/ui/res/painterResource.composable#painterResource(kotlin.Int)` is recommended instead.

| Parameters |
|---|---|
| `id: @https://developer.android.com/reference/kotlin/androidx/annotation/DrawableRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the resource identifier |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/ImageVector` | the vector data associated with the resource |