Icon

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

Icon component that draws bitmap using tint, defaulting to LocalContentColor

Parameters

bitmap

ImageBitmap to draw inside this Icon

contentDescription

StringRes 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

modifier

optional Modifier for this Icon

tint

tint to be applied to bitmap

If Color.Unspecified is provided, then no tint is applied


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

Icon component that draws imageVector using tint, defaulting to LocalContentColor

Parameters

imageVector

ImageVector to draw inside this Icon

contentDescription

StringRes 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

modifier

optional Modifier for this Icon

tint

tint to be applied to imageVector

If Color.Unspecified is provided, then no tint is applied


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

Icon component that draws a painter using tint, defaulting to LocalContentColor.

Parameters

painter

Painter to draw inside this Icon

contentDescription

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 androidx.compose.ui.res.stringResource or similar

modifier

optional Modifier for this Icon

tint

tint to be applied to painter

If Color.Unspecified is provided, then no tint is applied


fun Icon(modifier: Modifier = Modifier, isActive: Boolean, activeImageVector: ImageVector, disableImageVector: ImageVector, @StringRes contentDescription: Int?, tint: Color = Color.White)

Icon component that draws activeImageVector or disableImageVector using tint, defaulting to LocalContentColor

Parameters

modifier

optional Modifier for this Icon

isActive

Boolean will show one icon or another depending on whether it is active or not

activeImageVector

ImageVector to draw inside this Icon

disableImageVector

ImageVector to draw inside 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

tint

tint to be applied to activeImageVector or disableImageVector

If Color.Unspecified is provided, then no tint is applied