Select
Popover-backed select with optional local filtering, editable remote search, and panel styling controls.
Select
TuffSelect renders a Popover-backed dropdown for primitive string/number values. Options register their labels through TuffSelectItem, disabled options stay visible but cannot be selected, and remote editable mode emits search queries from the trigger input.
Basic Usage
Select
Demo will load when visible.
Remote Search (Editable)
Select (remote searchable)
Demo will load when visible.
Searchable
Select (searchable)
Demo will load when visible.
Disabled State
Select (disabled)
Demo will load when visible.
Disabled Options
Select (disabled option)
Demo will load when visible.
Scroll Panel
Select (scrollable dropdown)
Demo will load when visible.
API
TuffSelect Props
| Prop | Description | Type | Default |
|---|---|---|---|
| modelValue / v-model | Selected primitive value. | string | number | '' |
| placeholder | Placeholder shown in the trigger input when no label is selected. | string | '请选择' |
| disabled | Disables the trigger, closes the dropdown, and blocks option selection. | boolean | false |
| eager | Eagerly mounts the Popover panel. | boolean | false |
| searchable | Shows an internal search input for local option filtering when the select is not editable. | boolean | false |
| searchPlaceholder | Placeholder for the internal local search input. | string | 'Search' |
| editable | Uses the trigger input as editable search text and opens on focus. | boolean | false |
| remote | Enables editable remote mode and emits search while the dropdown is open. | boolean | false |
| dropdownMaxHeight | Maximum dropdown list height in pixels. | number | 280 |
| dropdownOffset | Popover offset from the trigger. | number | 6 |
| panelVariant | Popover panel surface variant. | 'solid' | 'dashed' | 'plain' | 'solid' |
| panelBackground | Popover panel background style. | 'pure' | 'mask' | 'blur' | 'glass' | 'refraction' | 'refraction' |
| panelShadow | Popover panel shadow strength. | 'none' | 'soft' | 'medium' | 'soft' |
| panelRadius | Popover panel corner radius. | number | 18 |
| panelPadding | Popover panel inner padding. | number | 4 |
| panelCard | Optional panel card overrides forwarded to the Popover panel. | BaseAnchorPanelCardProps | - |
TuffSelect Events
| Event | Description | Params |
|---|---|---|
| change | Emitted with the selected value after an enabled option is picked or the value is cleared. | (value: string | number) => void |
| update:modelValue | v-model update emitted with the selected value or empty string on clear. | (value: string | number) => void |
| search | Emitted in remote mode while the dropdown is open and editable text changes. | (query: string) => void |
TuffSelectItem Props
| Prop | Description | Type | Default |
|---|---|---|---|
| value | Primitive option value written to the parent select when picked. | string | number | - |
| label | Fallback visible label and registered selected-label text. | string | - |
| disabled | Prevents picking this option while leaving it visible in the dropdown. | boolean | false |