ButtonSelect
A button select: a set of mutually exclusive options shown as a row of buttons. The option data contract is in Selection and options.
Basic usage
Current alignment: left
Unframed and disabled items
Options support framed={false}; items with disabled are not selectable, and a group-level disabled disables the whole group (see Selection and options · Disabled).
Keyboard
After a click, focus moves into the group automatically (slightly better than the original, which leaves focus where it was so the arrow keys stay dead), and ↑↓←→ then cycle among non-disabled items and select directly; Enter re-affirms the current item. Pressing Tab also moves focus into the group. This is the "direct-select family" keyboard model (shared by TabSelect and RadioSelect).
API
Differences from OOUI
- Initially selected framed options are inverted too: the original inverts only after a user click while initially selected ones stay normal; this library applies the theme rule uniformly — active or disabled means inverted.
See also
- Tab-style direct select: TabSelect
- Radio group (native radio semantics): RadioSelect
- Option data and the keyboard focus model: Selection and options