Docs
Select

Select

Select component to select value from options.

Usage

Example Code

1import {
2    Select,
3    SelectContent,
4    SelectItem,
5    SelectTrigger,
6    SelectValue,
7  } from "inc-design-system/select"

Example Code

1<Select>
2  <SelectTrigger className="w-[180px]">
3    <SelectValue placeholder="Theme" />
4  </SelectTrigger>
5  <SelectContent>
6    <SelectItem value="light">Light</SelectItem>
7    <SelectItem value="dark">Dark</SelectItem>
8    <SelectItem value="system">System</SelectItem>
9  </SelectContent>
10</Select>

Props

Select

PropTypeDescriptionDefault
onValueChange(value: string) => voidA callback function is invoked when the selected value changes. Receives the newly selected value as an argument.-
defaultValuestringThe default value of the select component.-
valuestringThe value of the select component.-
disabledbooleanDisables the select component.-
onOpenChange(open: boolean) => voidEvent handler called when the open state of the select changes.-

SelectValue

PropTypeDescriptionDefault
placeholderstringThe placeholder of the select value.-