Chip
A single selectable pill — the quality-option look from the design. Text stays full-white in both states; selection shows through the block fill alone. Group several chips under one value for a radio-like row.
Examples
Quality row
moonbit
@sumi.chip("M", selected=size == "m",
on_click=set_size(_ => "m"))
@sumi.chip("8K", disabled=true)API
chip
| Name | Type | Default | Description |
|---|---|---|---|
| label | String | — | |
| selected | Bool | false | Filled on-state (controlled) |
| on_click | Cmd | — | Click command (wire to your state) |
| disabled | Bool | false | Faded and inert |
| aria_label | String | — | |
| id | String | — | Element id |
| class | String | — | Extra class names |
| attrs | Attrs | — | Extra HTML attributes |
| style | Array[String] | [] | Extra inline styles |
* required (labelled) parameter — everything else is optional.