IconSchema
@Serializable
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
24when created via theicon()DSL helper. Whennullin JSON, the composable receivesnulland 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())Content copied to clipboard
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)