Components › Forms

Select

A listbox for picking one value, with groups, labels and disabled options.

Installation

npx plankui@latest add select

Usage

import { Select } from "@/components/ui/select";

<Select defaultValue="fra">
  <SelectTrigger><SelectValue /></SelectTrigger>
  <SelectContent>
    <SelectItem value="fra">Frankfurt</SelectItem>
  </SelectContent>
</Select>

API reference

PropTypeDefaultDescription
value / defaultValuestringControlled or initial value.
onValueChange(value: string) => voidCalled on selection.
SelectItem.disabledbooleanfalseMakes an option unselectable.

View the source on GitHub