Option List
An Option List displays a set of selectable items. It is used to create lists of actions, navigation, tree-type structures, and selections.
In it's simplest form, the Option List is a flat, selectable item list. With multi-selection, a Checkbox is incorporated.
<State initial={[]}> {([value, setValue]) => ( <OptionList options={[ {value: 1, text: "Atlanta"}, {value: 2, text: "Boston"}, {value: 3, text: "Charlotte"}, {value: 4, text: "Detroit"}, {value: 5, text: "El Paso"} ]} value={value} onChange={(data) => setValue([data])} /> )}</State>
<State initial={[]}> {([value, setValue]) => ( <OptionList options={[ {value: 1, text: "Fort Lauderdale"}, {value: 2, text: "Glendale"}, {value: 3, text: "Honolulu"}, {value: 4, text: "Indianapolis"}, {value: 5, text: "Jacksonville"} ]} value={value} onChange={(data, checked) => checked ? setValue(prev => [...prev, data]) : setValue(prev => prev.filter(item => item !== data)) } multiple /> )}</State>
Option Lists can have custom content inside individual options, regardless of what structure the Option List takes.