Components / Select

Forms

Select

stable

Pick one option from a list, with typeahead and sections.

since v1.23.8 kB gzip

Preview

Framework

Installation

npx @strata/cli add select

Usage

import { Select, SelectItem } from "@/components/strata";

<Select label="Framework" defaultSelectedKey="vite">
  <SelectItem id="vite">Vite</SelectItem>
  <SelectItem id="next">Next.js</SelectItem>
</Select>

Props

PropTypeDefault
label

Visible label.

ReactNode—
selectedKey

Controlled value.

Key | null—
onSelectionChange

Called when the user picks an option.

(key: Key) => void—
placeholder

Shown when empty.

string"Select an option"
isDisabled

Prevents interaction and dims the control.

booleanfalse

Accessibility

Was this page helpful?

Documented since v1.2 · components/select.mdx