IconSchema

@Serializable
data class IconSchema(val name: String, val color: ColorSchema? = null, val size: Int? = null, val style: IconSchema.Style = Style.OUTLINED)

Represents a Material Symbol icon rendered via the custom MaterialSymbol composable.

Fields:

  • name — Material Symbol identifier string (e.g. "home", "visibility", "add"). Must match a symbol available in the bundled font.

  • color — Optional tint applied to the icon. When null, inherits the local content color.

  • size — Icon size in dp. Defaults to 24 when created via the icon() DSL helper. When null in JSON, the composable receives null and renders at its intrinsic size.

  • style — Glyph style variant: Style.OUTLINED (default), Style.ROUNDED, or Style.SHARP.

DSL helpers (mosaic-server):

icon("home")                                                      // 24dp, outlined, no tint
icon("visibility", color = color(themeColorPrimary()), size = 20) // with overrides
icon("star", style = outlinedIcon()) // explicit style
icon("star", style = roundedIcon())
icon("star", style = sharpIcon())

Notes: The filled parameter (bold/filled variant) is not part of this schema — it is controlled per-call site in the client composable.

Constructors

Link copied to clipboard
constructor(name: String, color: ColorSchema? = null, size: Int? = null, style: IconSchema.Style = Style.OUTLINED)

Types

Link copied to clipboard

Properties

Link copied to clipboard
@SerialName(value = "color")
val color: ColorSchema?
Link copied to clipboard
@SerialName(value = "name")
val name: String
Link copied to clipboard
@SerialName(value = "size")
val size: Int?
Link copied to clipboard
@SerialName(value = "style")
val style: IconSchema.Style