Package-level declarations

The Icon component display any Icon coming from either of these sources:

It behaves like the Compose Foundation Icon component but it also accepts size parameter that have the following values (IconDefaults.kt):

  • Small (16.dp)

  • Medium (24.dp) - default size

  • Large (32.dp)

  • ExtraLarge (40.dp)

Use IconIntent.kt to pass one of the accepted intents:

  • Basic

  • Accent

  • Main

  • Support

  • Surface

  • Success

  • Alert

  • Danger

  • Neutral

  • Current

  • Unspecified

Icon(
sparkIcon = SparkIcons.Check,
tint = IconIntent.Main,
contentDescription = "Done",
size = IconSize.Large,
)
Light
Dark

Types

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun FilledIconButton(onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, shape: Shape = SparkTheme.shapes.full, colors: IconButtonColors = IconButtonDefaults.filledIconButtonColors(), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, content: @Composable () -> Unit)
Link copied to clipboard
fun FilledIconToggleButton(checked: Boolean, onCheckedChange: (Boolean) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, shape: Shape = ButtonShape.Rounded.shape, colors: IconToggleButtonColors = IconButtonDefaults.filledIconToggleButtonColors(), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, content: @Composable () -> Unit)
Link copied to clipboard
fun FilledTonalIconButton(onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, shape: Shape = SparkTheme.shapes.full, colors: IconButtonColors = IconButtonDefaults.filledTonalIconButtonColors( containerColor = SparkTheme.colors.mainContainer, ), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, content: @Composable () -> Unit)
Link copied to clipboard
fun FilledTonalIconToggleButton(checked: Boolean, onCheckedChange: (Boolean) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, shape: ButtonShape = ButtonShape.Rounded, colors: IconToggleButtonColors = IconButtonDefaults.filledTonalIconToggleButtonColors( checkedContainerColor = SparkTheme.colors.mainContainer, checkedContentColor = contentColorFor(backgroundColor = SparkTheme.colors.mainContainer), ), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, content: @Composable () -> Unit)
Link copied to clipboard
fun Icon(bitmap: ImageBitmap, contentDescription: String?, modifier: Modifier = Modifier, tint: Color = IconDefaults.intent.color(), size: IconSize? = null)

Icon component that draws bitmap using tint, defaulting to LocalContentColor. For a clickable icon, see IconButton.

fun Icon(painter: Painter, contentDescription: String?, modifier: Modifier = Modifier, tint: Color = IconDefaults.intent.color(), size: IconSize? = null)

Icon component that draws painter using tint, defaulting to LocalContentColor. For a clickable icon, see IconButton.

fun Icon(imageVector: ImageVector, contentDescription: String?, modifier: Modifier = Modifier, tint: Color = IconDefaults.intent.color(), size: IconSize? = null)

Icon component that draws imageVector using tint, defaulting to LocalContentColor. For a clickable icon, see IconButton.

fun Icon(sparkIcon: SparkIcon, contentDescription: String?, modifier: Modifier = Modifier, tint: Color = IconDefaults.intent.color(), size: IconSize? = null)

Icon component that draws sparkIcon using tint, defaulting to LocalContentColor. For a clickable icon, see IconButton.

Link copied to clipboard
fun IconButton(onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, colors: IconButtonColors = IconButtonDefaults.iconButtonColors(), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, content: @Composable () -> Unit)
Link copied to clipboard
fun IconToggleButton(checked: Boolean, onCheckedChange: (Boolean) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, colors: IconToggleButtonColors = IconButtonDefaults.iconToggleButtonColors(), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, content: @Composable () -> Unit)
Link copied to clipboard
fun OutlinedIconButton(onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, shape: Shape = SparkTheme.shapes.full, colors: IconButtonColors = IconButtonDefaults.outlinedIconButtonColors(), border: BorderStroke? = IconButtonDefaults.outlinedIconButtonBorder(enabled), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, content: @Composable () -> Unit)
Link copied to clipboard
fun OutlinedIconToggleButton(checked: Boolean, onCheckedChange: (Boolean) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, shape: Shape = ButtonShape.Rounded.shape, colors: IconToggleButtonColors = IconButtonDefaults.outlinedIconToggleButtonColors(), border: BorderStroke? = IconButtonDefaults.outlinedIconToggleButtonBorder(enabled, checked), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, content: @Composable () -> Unit)