SparkIcon

sealed interface SparkIcon

A unified representation of different icon types used in the Spark design system.

This sealed interface provides a type-safe way to handle various icon formats, enabling consistent icon management across static and animated variants. The different implementations support different rendering approaches and animation capabilities.

It also allows spark components to enforce consumers to use the icons from the design system.

Inheritors

Types

Link copied to clipboard
data class AnimatedDrawableRes(@DrawableRes val drawableId: Int) : SparkIcon

An icon represented by an android animated vector drawable.

Link copied to clipboard
data class AnimatedPainter(val painterProvider: @Composable (atEnd: Boolean) -> Painter) : SparkIcon

An icon represented by a composable painter provider.

Link copied to clipboard
data class DrawableRes(@DrawableRes val drawableId: Int) : SparkIcon

An icon represented by an android drawable resource.

Link copied to clipboard
data class Vector(val imageVector: ImageVector) : SparkIcon

An icon represented by a Compose ImageVector.