ToolkitIcon
One icon slot of a toolkit component, such as a navigation item or a button.
Five sources are accepted:
Vector, a Compose ImageVector like
Icons.Rounded.Share.Resource, a static drawable or vector XML resource, drawn through a painter.
Bitmap, a runtime Compose ImageBitmap, with authored colors preserved by default.
AnimatedVector, an Animated Vector Drawable that plays when the component is clicked.
Lottie, bundled Lottie JSON that plays once per interaction.
Both animated sources accept Animated.loop to keep playing instead of only on interaction; it is off by default, orthogonal to their replay mode, and Animated.loopTrigger decides whether the loop starts on its own or on the first interaction.
Components that own a selected state take two of these, one per state, and both slots accept any of the five sources. See :library:core:designsystem README.md for the accepted combinations and the behavior of each one.
Inheritors
Types
Playback options shared by bundled animation sources; these are presentation values.
Icon backed by an Animated Vector Drawable.
Icon backed by a runtime Compose ImageBitmap. Nothing about it animates.
Bundled Lottie JSON in res/raw. Plays once per interaction unless loop is set, in which case loopTrigger decides whether the loop starts on its own or on the first interaction. Artwork retains its authored colors; the renderer's tint applies only when tintable is true. Prefer small vector-only compositions for navigation and button icons.
Icon backed by a static drawable or vector XML resource. Nothing about it animates.
Icon backed by a Compose ImageVector, for example a Material icon.