Select
Styled native <select>
One choice from a list too long for radios. It is the native <select>, so phones show their own picker and every keyboard and screen reader already knows it. To type and filter a long list, use Combobox; to keep the options visible, Listbox.
Basic
The two TV seasons and the film
Pick one
placeholdershows until something is picked and reads asundefined; withrequired, an unpicked select fails validation as it should.- Options can be grouped:
{ label, options: [...] }becomes an<optgroup>. - On Chrome 135+ the open list is styled too (
appearance: base-select); elsewhere the browser's own list opens.
Usage
ts
import { BlessSelect } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
id | string | — | |
options* | (BlessOption<T> | { label: string; options: BlessOption<T>[]; })[] | — | |
placeholder | string | — | |
size | "md" | "sm" | "lg" | "md" | |
disabled | boolean | — | |
invalid | boolean | — | |
description | string | — | |
error | string | — | |
modelValue | T | — |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: T | undefined] |