Icon

@Composable
fun Icon(painter: Painter, contentDescription: String?, modifier: Modifier = Modifier, tint: Color = LocalContentColor.current)

Icon component that draws a Painter with tinting support.

By default, the icon uses LocalContentColor for tinting. Pass Color.Unspecified to tint to disable tinting and use the painter's original colors.

If the painter has an intrinsic size, it will be used. Otherwise, the icon defaults to IconDefaults.defaultSize.

Since

0.6.0

Parameters

painter

The Painter to draw.

contentDescription

Accessibility description for the icon. Should be provided unless the icon is purely decorative. Pass null for decorative icons.

modifier

Modifier to apply to the icon.

tint

The tint color to apply. Defaults to LocalContentColor. Pass Color.Unspecified to disable tinting.


@Composable
fun Icon(imageVector: ImageVector, contentDescription: String?, modifier: Modifier = Modifier, tint: Color = LocalContentColor.current)

Icon component that draws an ImageVector with tinting support.

Since

0.6.0

Parameters

imageVector

The ImageVector to draw.

contentDescription

Accessibility description for the icon.

modifier

Modifier to apply to the icon.

tint

The tint color to apply. Defaults to LocalContentColor.


@Composable
fun Icon(bitmap: ImageBitmap, contentDescription: String?, modifier: Modifier = Modifier, tint: Color = LocalContentColor.current)

Icon component that draws an ImageBitmap with tinting support.

Since

0.6.0

Parameters

bitmap

The ImageBitmap to draw.

contentDescription

Accessibility description for the icon.

modifier

Modifier to apply to the icon.

tint

The tint color to apply. Defaults to LocalContentColor.