SelectButton
moleculesA glyph button with a transparent native select on top: the platform dropdown with an icon-button footprint, for toolbar pickers.
Editor toolbar pickers
glyph or icon, options, value and onchange; active tints the box when the current value is not the default.
Medium text · Soft wrap
Boxes, groups and rows
box xs, sm, md, lg share the square scale; groups renders native optgroup sections; variant="row" with label beside the glyph for an overflow menu, block fills the width.
States
sound={false} with a title tooltip, hitArea="compact" in a dense row, shrink={false} in a squeezed flex row, and a long option label in row form.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
glyph | string | — | Visible content of the button (a letter like "A" or an emoji icon). |
icon | IconName | — | Registry glyph, used instead of `glyph`. |
iconChildren | Snippet | — | Raw SVG children for an off-registry glyph. |
variant | 'square' | 'row' | 'square' | `row` is a full-width, left-aligned row showing `label` beside the glyph (overflow menus); `square` is the compact icon box. |
active | boolean | false | Accent tint when the picker's current value is "on". |
label required | string | — | |
title | string | — | |
value required | string | — | |
options | Option[] | — | Flat option list. Ignored when `groups` is given. |
groups | { label: string; options: Option[] }[] | — | Sectioned options, rendered as native <optgroup> blocks (TSU-1). Used by the theme picker to split light/dark; falls back to `options` otherwise. |
onchange required | (value: string) => void | — | |
box | 'xs' | 'sm' | 'md' | 'lg' | — | Shared square box scale (`--box-xs/sm/md/lg`); default is the 2.25rem icon box. |
hitArea | 'auto' | 'compact' | 'auto' | |
grow | boolean | false | Fill the free space of a flex row (`flex: 1 1 0`). |
shrink | boolean | true | `false` pins the box (`flex: none`) so a flex row cannot squeeze it. |
block | boolean | false | Full-width block. |
sound | boolean | true | Play UI sounds when enabled globally; false silences this instance. |
disabled | boolean | false | |
class | string | '' |