ToolkitIconContent

fun ToolkitIconContent(icon: ToolkitIcon, contentDescription: String?, modifier: Modifier = Modifier, atEnd: Boolean = false, interacted: Boolean = false, tint: Color = LocalContentColor.current)(source)

Renders a single ToolkitIcon exactly as described: a Compose ImageVector, a static drawable/vector resource, a runtime bitmap, or one frame state of an animated source.

This composable is intentionally stateless. Deciding which icon a navigation item shows, and whether an AVD currently rests on its first or last frame, is the job of AnimatedToolkitIcon.

Parameters

icon

The ToolkitIcon to display.

contentDescription

Optional description of the icon for accessibility.

modifier

The Modifier to apply to the icon.

atEnd

For ToolkitIcon.AnimatedVector only: true renders the last frame of the animation, false the first one. Changing this value animates between the two. It is ignored by an animation that is currently looping, which drives its own playback.

interacted

Whether the component drawing this icon has been clicked or selected. It only matters for an icon that loops ToolkitIconLoopTrigger.OnInteraction: false, the default, keeps such an icon resting, and a stateless caller with nothing to interact with can leave it there.

tint

Tint color to apply to tintable icon sources, defaults to LocalContentColor.