Skip to content

TogglerBar ​

<TogglerBar name="s" values="2|3|5|7" value="2|5"> -- a row of buttons of which any number are down, Wolfram's TogglerBar. Click one to toggle it; the binding _s is the List of the selected entries' values, in bar order, so Length(_s) and Sum(_s) mean what they say. Entries are |-separated and may be value -> label; value names the entries down at first, |-separated.

Demos·packages/components/src/toggler-bar-box.ts· draws TogglerBar

Props

PropTypeDefaultNotes
namestring""The binding this control drives: name="a" fills the wildcard _a.reflects
valuesstring""The entries, |-separated, each optionally value -> label.
valuestring""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 <toggler-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.