Icon

Functions summary

Unit
@Composable
Icon(bitmap: ImageBitmap, contentDescription: String?, modifier: Modifier)

An icon component that draws bitmap, with a default size of LocalIconSize, and applies a content color tint.

Unit
@Composable
Icon(
    imageVector: ImageVector,
    contentDescription: String?,
    modifier: Modifier
)

An icon component that draws imageVector, with a default size of LocalIconSize, and applies a content color tint.

Unit
@Composable
Icon(painter: Painter, contentDescription: String?, modifier: Modifier)

An icon component that draws painter, with a default size of LocalIconSize, and applies a content color tint.

Unit
@Composable
Icon(
    bitmap: ImageBitmap,
    tint: Color,
    contentDescription: String?,
    modifier: Modifier
)

An icon component that draws bitmap, with a default size of LocalIconSize, and applies a tint of tint.

Unit
@Composable
Icon(
    imageVector: ImageVector,
    tint: Color,
    contentDescription: String?,
    modifier: Modifier
)

An icon component that draws imageVector, with a default size of LocalIconSize, and applies a tint of tint.

Unit
@Composable
Icon(
    painter: Painter,
    tint: ColorProducer?,
    contentDescription: String?,
    modifier: Modifier
)

An icon component that draws painter, with a default size of LocalIconSize, and applies a tint of tint.

Functions

@Composable
fun Icon(
    bitmap: ImageBitmap,
    contentDescription: String?,
    modifier: Modifier = Modifier
): Unit

An icon component that draws bitmap, with a default size of LocalIconSize, and applies a content color tint. 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. The recommended icon sizes can be retrieved using GlimmerTheme.Companion.iconSizes. A size can be set explicitly using size, and components can use LocalIconSize to set the preferred size for any Icons inside the component. The content color used to tint this icon is provided by surface. To set a custom tint color, use the Icon overload with a tint parameter. For multicolored icons and icons that should not be tinted, use the overload and set Color.Unspecified as the tint color. For generic images that should not be tinted, and should not use the provided icon size, use the generic androidx.compose.foundation.Image instead.

Parameters
bitmap: ImageBitmap

ImageBitmap to draw inside this icon

contentDescription: String?

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: Modifier = Modifier

the Modifier to be applied to this icon

@Composable
fun Icon(
    imageVector: ImageVector,
    contentDescription: String?,
    modifier: Modifier = Modifier
): Unit

An icon component that draws imageVector, with a default size of LocalIconSize, and applies a content color tint. 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. The recommended icon sizes can be retrieved using GlimmerTheme.Companion.iconSizes. A size can be set explicitly using size, and components can use LocalIconSize to set the preferred size for any Icons inside the component. The content color used to tint this icon is provided by surface. To set a custom tint color, use the Icon overload with a tint parameter. For multicolored icons and icons that should not be tinted, use the overload and set Color.Unspecified as the tint color. For generic images that should not be tinted, and should not use the provided icon size, use the generic androidx.compose.foundation.Image instead.

Parameters
imageVector: ImageVector

ImageVector to draw inside this icon

contentDescription: String?

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: Modifier = Modifier

the Modifier to be applied to this icon

@Composable
fun Icon(
    painter: Painter,
    contentDescription: String?,
    modifier: Modifier = Modifier
): Unit

An icon component that draws painter, with a default size of LocalIconSize, and applies a content color tint. 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. The recommended icon sizes can be retrieved using GlimmerTheme.Companion.iconSizes. A size can be set explicitly using size, and components can use LocalIconSize to set the preferred size for any Icons inside the component. The content color used to tint this icon is provided by surface. To set a custom tint color, use the Icon overload with a tint parameter. For multicolored icons and icons that should not be tinted, use the overload and set null for the tint parameter. For generic images that should not be tinted, and should not use the provided icon size, use the generic androidx.compose.foundation.Image instead.

Parameters
painter: Painter

Painter to draw inside this icon

contentDescription: String?

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: Modifier = Modifier

the Modifier to be applied to this icon

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

An icon component that draws bitmap, with a default size of LocalIconSize, and applies a tint of tint. 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. The recommended icon sizes can be retrieved using GlimmerTheme.Companion.iconSizes. A size can be set explicitly using size, and components can use LocalIconSize to set the preferred size for any Icons inside the component. Use the other overload of Icon without a tint parameter to apply the recommended content color provided by a surface. For multicolored icons and icons that should not be tinted, set tint to Color.Unspecified. For generic images that should not be tinted, and should not use the provided icon size, use the generic androidx.compose.foundation.Image instead.

Parameters
bitmap: ImageBitmap

ImageBitmap to draw inside this icon

tint: Color

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

contentDescription: String?

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: Modifier = Modifier

the Modifier to be applied to this icon

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

An icon component that draws imageVector, with a default size of LocalIconSize, and applies a tint of tint. 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. The recommended icon sizes can be retrieved using GlimmerTheme.Companion.iconSizes. A size can be set explicitly using size, and components can use LocalIconSize to set the preferred size for any Icons inside the component. Use the other overload of Icon without a tint parameter to apply the recommended content color provided by a surface. For multicolored icons and icons that should not be tinted, set tint to Color.Unspecified. For generic images that should not be tinted, and should not use the provided icon size, use the generic androidx.compose.foundation.Image instead.

Parameters
imageVector: ImageVector

ImageVector to draw inside this icon

tint: Color

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

contentDescription: String?

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: Modifier = Modifier

the Modifier to be applied to this icon

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

An icon component that draws painter, with a default size of LocalIconSize, and applies a tint of tint. 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. The recommended icon sizes can be retrieved using GlimmerTheme.Companion.iconSizes. A size can be set explicitly using size, and components can use LocalIconSize to set the preferred size for any Icons inside the component. Use the other overload of Icon without a tint parameter to apply the recommended content color provided by a surface. For multicolored icons and icons that should not be tinted, set tint to null. For generic images that should not be tinted, and should not use the provided icon size, use the generic androidx.compose.foundation.Image instead.

Parameters
painter: Painter

Painter to draw inside this icon

tint: ColorProducer?

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

contentDescription: String?

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: Modifier = Modifier

the Modifier to be applied to this icon