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(val drawableId: Int) : SparkIcon

An icon represented by an android animated vector drawable.

Link copied to clipboard
data class AnimatedPainter(val painterProvider: (atEnd: Boolean) -> ERROR CLASS: Symbol not found for Painter) : SparkIcon

An icon represented by a composable painter provider.

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

An icon represented by an Android drawable resource ID.

Link copied to clipboard
data class Resource(val res: ERROR CLASS: Symbol not found for DrawableResource) : SparkIcon

An icon represented by a Compose Multiplatform DrawableResource.

Link copied to clipboard
data class Vector(val imageVector: ERROR CLASS: Symbol not found for ImageVector) : SparkIcon

An icon represented by a Compose ImageVector.