SetterBar
<SetterBar name="k" values="1|2|3|5"> -- a row of buttons of which one is down, Wolfram's SetterBar. Click one to set it; arrows move the selection along the bar. Entries are |-separated and may be value -> label; a value that looks like mathematics is typeset. Inside a scope the binding _k is the entry's value (a number, a named value) or its index for a bare word.
<RadioButtonBar> is the same control drawn with radio buttons.
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
name | string | "" | The binding this control drives: name="a" fills the wildcard _a.reflects |
values | string | "" | The entries, |-separated, each optionally value -> label. |
value | string | "" | The entry (or, for a multiple selection, the |-separated entries) selected at first. |
As a web component
Plain custom elements, no framework required: import @enumeratio/frontend for the side effect and write <setter-bar-box> in any HTML. Attributes are kebab-case and always strings; the props table above names each one's attribute where it differs from its prop.