Icon

Draws a vector or bitmap symbol that follows the content color.

When to use

Use icons to support text or to label compact controls. Icons take their color from the surface they sit on, so they stay readable in every theme. Material Symbols are the recommended icon set.

Icons are 24 dp by default. Inside buttons use the size helpers from ButtonDefaults.

Playground

The interactive page has a playground with live property controls for this component and generated code.

Examples

Icons and tint

Icon(Icons.Rounded.Home, contentDescription = "Home")
Icon(Icons.Rounded.Settings, contentDescription = "Settings", tint = MaterialTheme.colorScheme.primary)
Icon(Icons.Rounded.Interests, contentDescription = null, modifier = Modifier.size(40.dp))

Parameters

NameTypeDefaultDescription
imageVector / painter / bitmapImageVector | Painter | ImageBitmapThe image to draw.
contentDescriptionString?Accessible name. Use null only for decorative icons.
tintColorLocalContentColor.currentTint color.

Guidelines

Do:

Don't:

Accessibility

Related components