Skip to content

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

  • placeholder shows until something is picked and reads as undefined; with required, 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

NameTypeDefaultDescription
idstring—
options*(BlessOption<T> | { label: string; options: BlessOption<T>[]; })[]—
placeholderstring—
size"md" | "sm" | "lg""md"
disabledboolean—
invalidboolean—
descriptionstring—
errorstring—
modelValueT—

Events

NamePayloadDescription
update:modelValue[value: T | undefined]

Released under the MIT License. Character names and artwork belong to their owners.