Icon

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

A Icon component with Miuix style.

Draws imageVector using tint, with a default value of LocalContentColor. If imageVector has no intrinsic size, this component falls back to the recommended default size. 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. For multicolored icons and icons that should not be tinted, use Color.Unspecified for tint. For generic images that should not be tinted, and do not follow the recommended icon size, use androidx.compose.foundation.Image instead. For a clickable icon, see IconButton.

Parameters

imageVector

ImageVector 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 stringResource or similar

modifier

the Modifier to be applied to this icon

tint

tint to be applied to imageVector. If Color.Unspecified is provided, then no tint is applied.


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

A Icon component with Miuix style.

Draws bitmap using tint, with a default value of LocalContentColor. If bitmap has no intrinsic size, this component falls back to the recommended default size. 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. For multicolored icons and icons that should not be tinted, use Color.Unspecified for tint. For generic images that should not be tinted, and do not follow the recommended icon size, use androidx.compose.foundation.Image instead. For a clickable icon, see IconButton.

Parameters

bitmap

ImageBitmap 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 stringResource or similar

modifier

the Modifier to be applied to this icon

tint

tint to be applied to bitmap. If Color.Unspecified is provided, then no tint is applied.


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

A Icon component with Miuix style.

Draws painter using tint, with a default value of LocalContentColor. If painter has no intrinsic size, this component falls back to the recommended default size. 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. For multicolored icons and icons that should not be tinted, use Color.Unspecified for tint. For generic images that should not be tinted, and do not follow the recommended icon size, use androidx.compose.foundation.Image instead. For a clickable icon, see IconButton.

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 stringResource or similar

modifier

the Modifier to be applied to this icon

tint

tint to be applied to painter. If Color.Unspecified is provided, then no tint is applied.


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

A Icon component with Miuix style.

Draws painter using a tint produced by a ColorProducer. The producer is read at draw time, so a tint that changes frequently (animations, scroll-driven values) does not recompose this Icon. If painter has no intrinsic size, this component falls back to the recommended default size. 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. For multicolored icons and icons that should not be tinted, pass null for tint. For generic images that should not be tinted, and do not follow the recommended icon size, use androidx.compose.foundation.Image instead. For a clickable icon, see IconButton.

Parameters

painter

Painter to draw inside this icon

tint

tint to be applied to painter. If null, then no tint is applied.

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 stringResource or similar

modifier

the Modifier to be applied to this icon