Icon

fun Icon(sparkIcon: SparkIcon, contentDescription: String?, modifier: Modifier = Modifier, tint: Color = IconDefaults.intent.color(), size: IconSize? = null)

Icon component that draws sparkIcon using tint, defaulting to LocalContentColor. For a clickable icon, see IconButton.

Parameters

sparkIcon

SparkIcon 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

to be applied to sparkIcon. If no tint is provided, then a default is used.

size

one of IconSize to be applied as size of the icon. If no size is provided the default IconSize.Medium is used.


fun Icon(imageVector: ImageVector, contentDescription: String?, modifier: Modifier = Modifier, tint: Color = IconDefaults.intent.color(), size: IconSize? = null)

Icon component that draws imageVector using tint, defaulting to LocalContentColor. 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 androidx.compose.ui.res.stringResource or similar

modifier

optional Modifier for this Icon

tint

to be applied to imageVector. If no intent is provided, then a default is used.

size

one of IconSize to be applied as size of the icon. If no size is provided the default IconSize.Medium is used.


fun Icon(bitmap: ImageBitmap, contentDescription: String?, modifier: Modifier = Modifier, tint: Color = IconDefaults.intent.color(), size: IconSize? = null)

Icon component that draws bitmap using tint, defaulting to LocalContentColor. 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 androidx.compose.ui.res.stringResource or similar

modifier

optional Modifier for this Icon

tint

to be applied to bitmap. If no intent is provided, then a default is used

size

one of IconSize to be applied as size of the icon. If no size is provided the default IconSize.Medium is used.


fun Icon(painter: Painter, contentDescription: String?, modifier: Modifier = Modifier, tint: Color = IconDefaults.intent.color(), size: IconSize? = null)

Icon component that draws painter using tint, defaulting to LocalContentColor. 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 androidx.compose.ui.res.stringResource or similar

modifier

optional Modifier for this Icon

tint

to be applied to painter. If no intent is provided, then a default is used

size

one of IconSize to be applied as size of the icon. If no size is provided the default IconSize.Medium is used.