Select

Forms

A dropdown select input for choosing from a list of options. Use selects when you have a predefined list of options and limited screen space.

Import

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

Usage

Basic Select

Standard dropdown select

With Placeholder

Select showing placeholder option

With Error

Select showing error state

Please select a product

Disabled

Select in disabled state

API Reference

PropTypeDefaultDescription
labelstringLabel text displayed above the select
options*SelectOption[]Array of options with value, label, and optional disabled
valuestringControlled selected value
defaultValuestringDefault selected value (uncontrolled)
onValueChange(value: string) => voidHandler called when selection changes
placeholderstringPlaceholder text when no option is selected
errorstringError message to display below the select
disabledbooleanfalseWhether the select is disabled

Related Components