Skip to content

ListPicker ​

<ListPicker name="s" values="2|3|5|7|11" value="3|7"> -- a list in view, with any number of entries selected: Wolfram's ListPicker. Click toggles an entry; arrows move, Space toggles. The binding _s is the List of selected values in list order. single allows one selection only (Wolfram's Multiselection -> False), and then binds the value itself. rows is how many entries show before scrolling.

Demos·packages/components/src/list-picker-box.ts· draws ListPicker

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.
singlebooleanfalseAllow one selection only; the binding is then the value, not a list of one.reflects
rowsnumber6Entries visible before the list scrolls.

As a web component

Plain custom elements, no framework required: import @enumeratio/frontend for the side effect and write <list-picker-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.