# Icon

## Functions summary

|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Icon.composable#Icon(androidx.compose.ui.graphics.ImageBitmap,kotlin.String,androidx.compose.ui.Modifier)(bitmap: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ImageBitmap, contentDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier)` An icon component that draws `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.ImageBitmap,kotlin.String,androidx.compose.ui.Modifier)`, with a default size of `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()`, and applies a content color tint. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Icon.composable#Icon(androidx.compose.ui.graphics.vector.ImageVector,kotlin.String,androidx.compose.ui.Modifier)( imageVector: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/ImageVector, contentDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier )` An icon component that draws `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.vector.ImageVector,kotlin.String,androidx.compose.ui.Modifier)`, with a default size of `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()`, and applies a content color tint. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Icon.composable#Icon(androidx.compose.ui.graphics.painter.Painter,kotlin.String,androidx.compose.ui.Modifier)(painter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter, contentDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier)` An icon component that draws `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.painter.Painter,kotlin.String,androidx.compose.ui.Modifier)`, with a default size of `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()`, and applies a content color tint. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Icon.composable#Icon(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.graphics.Color,kotlin.String,androidx.compose.ui.Modifier)( bitmap: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ImageBitmap, tint: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, contentDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier )` An icon component that draws `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.graphics.Color,kotlin.String,androidx.compose.ui.Modifier)`, with a default size of `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()`, and applies a tint of `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.graphics.Color,kotlin.String,androidx.compose.ui.Modifier)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Icon.composable#Icon(androidx.compose.ui.graphics.vector.ImageVector,androidx.compose.ui.graphics.Color,kotlin.String,androidx.compose.ui.Modifier)( imageVector: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/ImageVector, tint: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, contentDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier )` An icon component that draws `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.vector.ImageVector,androidx.compose.ui.graphics.Color,kotlin.String,androidx.compose.ui.Modifier)`, with a default size of `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()`, and applies a tint of `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.vector.ImageVector,androidx.compose.ui.graphics.Color,kotlin.String,androidx.compose.ui.Modifier)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Icon.composable#Icon(androidx.compose.ui.graphics.painter.Painter,androidx.compose.ui.graphics.ColorProducer,kotlin.String,androidx.compose.ui.Modifier)( painter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter, tint: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorProducer?, contentDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier )` An icon component that draws `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.painter.Painter,androidx.compose.ui.graphics.ColorProducer,kotlin.String,androidx.compose.ui.Modifier)`, with a default size of `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()`, and applies a tint of `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.painter.Painter,androidx.compose.ui.graphics.ColorProducer,kotlin.String,androidx.compose.ui.Modifier)`. |

## Functions

### Icon

Artifact: [androidx.xr.glimmer:glimmer](https://developer.android.com/jetpack/androidx/releases/xr-glimmer) [View Source](https://cs.android.com/search?q=file:androidx/xr/glimmer/Icon.kt+function:Icon) Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
@Composable
fun Icon(
    bitmap: ImageBitmap,
    contentDescription: String?,
    modifier: Modifier = Modifier
): Unit
```

An icon component that draws `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.ImageBitmap,kotlin.String,androidx.compose.ui.Modifier)`, with a default size of `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()`, and applies a content color tint. Icon is an opinionated component designed to be used with single-color icons so that they can be tinted correctly for the component they are placed in. The recommended icon sizes can be retrieved using `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/GlimmerTheme#iconSizes()`. A size can be set explicitly using `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/size.modifier#(androidx.compose.ui.Modifier).size(androidx.compose.ui.unit.Dp)`, and components can use `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()` to set the preferred size for any Icons inside the component. The content color used to tint this icon is provided by `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/surface.composable#(androidx.compose.ui.Modifier).surface(kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.xr.glimmer.SurfaceDepthEffect,androidx.compose.foundation.interaction.InteractionSource)`. To set a custom tint color, use the Icon overload with a tint parameter. For multicolored icons and icons that should not be tinted, use the overload and set `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Unspecified()` as the tint color. For generic images that should not be tinted, and should not use the provided icon size, use the generic `https://developer.android.com/reference/kotlin/androidx/compose/foundation/Image.composable#Image(androidx.compose.ui.graphics.ImageBitmap,kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.Alignment,androidx.compose.ui.layout.ContentScale,kotlin.Float,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.FilterQuality)` instead.

| Parameters |
|---|---|
| `bitmap: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ImageBitmap` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ImageBitmap` to draw inside this icon |
| `contentDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | text used by accessibility services to describe what this icon represents. This should always be provided unless this icon is used for decorative purposes, and does not represent a meaningful action that a user can take. This text should be localized, such as by using `https://developer.android.com/reference/kotlin/androidx/compose/ui/res/stringResource.composable#stringResource(kotlin.Int)` or similar |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` to be applied to this icon |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()` |   |
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/GlimmerTheme#iconSizes()` |   |

### Icon

Artifact: [androidx.xr.glimmer:glimmer](https://developer.android.com/jetpack/androidx/releases/xr-glimmer) [View Source](https://cs.android.com/search?q=file:androidx/xr/glimmer/Icon.kt+function:Icon) Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
@Composable
fun Icon(
    imageVector: ImageVector,
    contentDescription: String?,
    modifier: Modifier = Modifier
): Unit
```

An icon component that draws `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.vector.ImageVector,kotlin.String,androidx.compose.ui.Modifier)`, with a default size of `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()`, and applies a content color tint. Icon is an opinionated component designed to be used with single-color icons so that they can be tinted correctly for the component they are placed in. The recommended icon sizes can be retrieved using `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/GlimmerTheme#iconSizes()`. A size can be set explicitly using `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/size.modifier#(androidx.compose.ui.Modifier).size(androidx.compose.ui.unit.Dp)`, and components can use `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()` to set the preferred size for any Icons inside the component. The content color used to tint this icon is provided by `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/surface.composable#(androidx.compose.ui.Modifier).surface(kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.xr.glimmer.SurfaceDepthEffect,androidx.compose.foundation.interaction.InteractionSource)`. To set a custom tint color, use the Icon overload with a tint parameter. For multicolored icons and icons that should not be tinted, use the overload and set `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Unspecified()` as the tint color. For generic images that should not be tinted, and should not use the provided icon size, use the generic `https://developer.android.com/reference/kotlin/androidx/compose/foundation/Image.composable#Image(androidx.compose.ui.graphics.ImageBitmap,kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.Alignment,androidx.compose.ui.layout.ContentScale,kotlin.Float,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.FilterQuality)` instead.

| Parameters |
|---|---|
| `imageVector: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/ImageVector` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/ImageVector` to draw inside this icon |
| `contentDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | text used by accessibility services to describe what this icon represents. This should always be provided unless this icon is used for decorative purposes, and does not represent a meaningful action that a user can take. This text should be localized, such as by using `https://developer.android.com/reference/kotlin/androidx/compose/ui/res/stringResource.composable#stringResource(kotlin.Int)` or similar |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` to be applied to this icon |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()` |   |
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/GlimmerTheme#iconSizes()` |   |

### Icon

Artifact: [androidx.xr.glimmer:glimmer](https://developer.android.com/jetpack/androidx/releases/xr-glimmer) [View Source](https://cs.android.com/search?q=file:androidx/xr/glimmer/Icon.kt+function:Icon) Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
@Composable
fun Icon(
    painter: Painter,
    contentDescription: String?,
    modifier: Modifier = Modifier
): Unit
```

An icon component that draws `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.painter.Painter,kotlin.String,androidx.compose.ui.Modifier)`, with a default size of `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()`, and applies a content color tint. Icon is an opinionated component designed to be used with single-color icons so that they can be tinted correctly for the component they are placed in. The recommended icon sizes can be retrieved using `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/GlimmerTheme#iconSizes()`. A size can be set explicitly using `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/size.modifier#(androidx.compose.ui.Modifier).size(androidx.compose.ui.unit.Dp)`, and components can use `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()` to set the preferred size for any Icons inside the component. The content color used to tint this icon is provided by `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/surface.composable#(androidx.compose.ui.Modifier).surface(kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.xr.glimmer.SurfaceDepthEffect,androidx.compose.foundation.interaction.InteractionSource)`. To set a custom tint color, use the Icon overload with a tint parameter. For multicolored icons and icons that should not be tinted, use the overload and set `null` for the tint parameter. For generic images that should not be tinted, and should not use the provided icon size, use the generic `https://developer.android.com/reference/kotlin/androidx/compose/foundation/Image.composable#Image(androidx.compose.ui.graphics.ImageBitmap,kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.Alignment,androidx.compose.ui.layout.ContentScale,kotlin.Float,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.FilterQuality)` instead.

| Parameters |
|---|---|
| `painter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter` to draw inside this icon |
| `contentDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | text used by accessibility services to describe what this icon represents. This should always be provided unless this icon is used for decorative purposes, and does not represent a meaningful action that a user can take. This text should be localized, such as by using `https://developer.android.com/reference/kotlin/androidx/compose/ui/res/stringResource.composable#stringResource(kotlin.Int)` or similar |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` to be applied to this icon |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()` |   |
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/GlimmerTheme#iconSizes()` |   |

### Icon

Artifact: [androidx.xr.glimmer:glimmer](https://developer.android.com/jetpack/androidx/releases/xr-glimmer) [View Source](https://cs.android.com/search?q=file:androidx/xr/glimmer/Icon.kt+function:Icon) Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
@Composable
fun Icon(
    bitmap: ImageBitmap,
    tint: Color,
    contentDescription: String?,
    modifier: Modifier = Modifier
): Unit
```

An icon component that draws `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.graphics.Color,kotlin.String,androidx.compose.ui.Modifier)`, with a default size of `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()`, and applies a tint of `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.graphics.Color,kotlin.String,androidx.compose.ui.Modifier)`. Icon is an opinionated component designed to be used with single-color icons so that they can be tinted correctly for the component they are placed in. The recommended icon sizes can be retrieved using `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/GlimmerTheme#iconSizes()`. A size can be set explicitly using `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/size.modifier#(androidx.compose.ui.Modifier).size(androidx.compose.ui.unit.Dp)`, and components can use `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()` to set the preferred size for any Icons inside the component. Use the other overload of Icon without a `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.graphics.Color,kotlin.String,androidx.compose.ui.Modifier)` parameter to apply the recommended content color provided by a `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/surface.composable#(androidx.compose.ui.Modifier).surface(kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.xr.glimmer.SurfaceDepthEffect,androidx.compose.foundation.interaction.InteractionSource)`. For multicolored icons and icons that should not be tinted, set `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.graphics.Color,kotlin.String,androidx.compose.ui.Modifier)` to `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Unspecified()`. For generic images that should not be tinted, and should not use the provided icon size, use the generic `https://developer.android.com/reference/kotlin/androidx/compose/foundation/Image.composable#Image(androidx.compose.ui.graphics.ImageBitmap,kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.Alignment,androidx.compose.ui.layout.ContentScale,kotlin.Float,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.FilterQuality)` instead.

| Parameters |
|---|---|
| `bitmap: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ImageBitmap` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ImageBitmap` to draw inside this icon |
| `tint: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | tint to be applied to `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.graphics.Color,kotlin.String,androidx.compose.ui.Modifier)`. If `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Unspecified()` is provided, then no tint is applied. |
| `contentDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | text used by accessibility services to describe what this icon represents. This should always be provided unless this icon is used for decorative purposes, and does not represent a meaningful action that a user can take. This text should be localized, such as by using `https://developer.android.com/reference/kotlin/androidx/compose/ui/res/stringResource.composable#stringResource(kotlin.Int)` or similar |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` to be applied to this icon |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()` |   |
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/GlimmerTheme#iconSizes()` |   |

### Icon

Artifact: [androidx.xr.glimmer:glimmer](https://developer.android.com/jetpack/androidx/releases/xr-glimmer) [View Source](https://cs.android.com/search?q=file:androidx/xr/glimmer/Icon.kt+function:Icon) Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
@Composable
fun Icon(
    imageVector: ImageVector,
    tint: Color,
    contentDescription: String?,
    modifier: Modifier = Modifier
): Unit
```

An icon component that draws `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.vector.ImageVector,androidx.compose.ui.graphics.Color,kotlin.String,androidx.compose.ui.Modifier)`, with a default size of `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()`, and applies a tint of `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.vector.ImageVector,androidx.compose.ui.graphics.Color,kotlin.String,androidx.compose.ui.Modifier)`. Icon is an opinionated component designed to be used with single-color icons so that they can be tinted correctly for the component they are placed in. The recommended icon sizes can be retrieved using `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/GlimmerTheme#iconSizes()`. A size can be set explicitly using `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/size.modifier#(androidx.compose.ui.Modifier).size(androidx.compose.ui.unit.Dp)`, and components can use `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()` to set the preferred size for any Icons inside the component. Use the other overload of Icon without a `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.vector.ImageVector,androidx.compose.ui.graphics.Color,kotlin.String,androidx.compose.ui.Modifier)` parameter to apply the recommended content color provided by a `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/surface.composable#(androidx.compose.ui.Modifier).surface(kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.xr.glimmer.SurfaceDepthEffect,androidx.compose.foundation.interaction.InteractionSource)`. For multicolored icons and icons that should not be tinted, set `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.vector.ImageVector,androidx.compose.ui.graphics.Color,kotlin.String,androidx.compose.ui.Modifier)` to `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Unspecified()`. For generic images that should not be tinted, and should not use the provided icon size, use the generic `https://developer.android.com/reference/kotlin/androidx/compose/foundation/Image.composable#Image(androidx.compose.ui.graphics.ImageBitmap,kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.Alignment,androidx.compose.ui.layout.ContentScale,kotlin.Float,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.FilterQuality)` instead.

| Parameters |
|---|---|
| `imageVector: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/ImageVector` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/ImageVector` to draw inside this icon |
| `tint: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | tint to be applied to `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.vector.ImageVector,androidx.compose.ui.graphics.Color,kotlin.String,androidx.compose.ui.Modifier)`. If `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Unspecified()` is provided, then no tint is applied. |
| `contentDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | text used by accessibility services to describe what this icon represents. This should always be provided unless this icon is used for decorative purposes, and does not represent a meaningful action that a user can take. This text should be localized, such as by using `https://developer.android.com/reference/kotlin/androidx/compose/ui/res/stringResource.composable#stringResource(kotlin.Int)` or similar |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` to be applied to this icon |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()` |   |
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/GlimmerTheme#iconSizes()` |   |

### Icon

Artifact: [androidx.xr.glimmer:glimmer](https://developer.android.com/jetpack/androidx/releases/xr-glimmer) [View Source](https://cs.android.com/search?q=file:androidx/xr/glimmer/Icon.kt+function:Icon) Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
@Composable
fun Icon(
    painter: Painter,
    tint: ColorProducer?,
    contentDescription: String?,
    modifier: Modifier = Modifier
): Unit
```

An icon component that draws `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.painter.Painter,androidx.compose.ui.graphics.ColorProducer,kotlin.String,androidx.compose.ui.Modifier)`, with a default size of `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()`, and applies a tint of `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.painter.Painter,androidx.compose.ui.graphics.ColorProducer,kotlin.String,androidx.compose.ui.Modifier)`. Icon is an opinionated component designed to be used with single-color icons so that they can be tinted correctly for the component they are placed in. The recommended icon sizes can be retrieved using `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/GlimmerTheme#iconSizes()`. A size can be set explicitly using `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/size.modifier#(androidx.compose.ui.Modifier).size(androidx.compose.ui.unit.Dp)`, and components can use `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()` to set the preferred size for any Icons inside the component. Use the other overload of Icon without a `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.painter.Painter,androidx.compose.ui.graphics.ColorProducer,kotlin.String,androidx.compose.ui.Modifier)` parameter to apply the recommended content color provided by a `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/surface.composable#(androidx.compose.ui.Modifier).surface(kotlin.Boolean,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.xr.glimmer.SurfaceDepthEffect,androidx.compose.foundation.interaction.InteractionSource)`. For multicolored icons and icons that should not be tinted, set `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.painter.Painter,androidx.compose.ui.graphics.ColorProducer,kotlin.String,androidx.compose.ui.Modifier)` to `null`. For generic images that should not be tinted, and should not use the provided icon size, use the generic `https://developer.android.com/reference/kotlin/androidx/compose/foundation/Image.composable#Image(androidx.compose.ui.graphics.ImageBitmap,kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.Alignment,androidx.compose.ui.layout.ContentScale,kotlin.Float,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.FilterQuality)` instead.

| Parameters |
|---|---|
| `painter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter` to draw inside this icon |
| `tint: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorProducer?` | tint to be applied to `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#Icon(androidx.compose.ui.graphics.painter.Painter,androidx.compose.ui.graphics.ColorProducer,kotlin.String,androidx.compose.ui.Modifier)`. If null, then no tint is applied. |
| `contentDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | text used by accessibility services to describe what this icon represents. This should always be provided unless this icon is used for decorative purposes, and does not represent a meaningful action that a user can take. This text should be localized, such as by using `https://developer.android.com/reference/kotlin/androidx/compose/ui/res/stringResource.composable#stringResource(kotlin.Int)` or similar |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` to be applied to this icon |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/package-summary#LocalIconSize()` |   |
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/GlimmerTheme#iconSizes()` |   |