Select Example

How to use this select

Props

NameTypeDefaultDescription
asChildbooleanfalseChange the default rendered element for the one passed as a child, merging their props and behavior.
placeholderstring (for SelectValue)-Text that appears in the form control when it has no value set.
valuestring (for SelectItem)-The value of the field if it is selected.

Playground

Import from @filigran/ui :

Import {Select, SelectTrigger, SelectValue, SelectContent, SelectItem} from '@filigran/ui'


           <Select>
            <SelectTrigger className="w-[180px]">
              <SelectValue placeholder="Theme" />
            </SelectTrigger>
            <SelectContent>
              <SelectItem value="light">Light</SelectItem>
              <SelectItem value="dark">Dark</SelectItem>
              <SelectItem value="system">System</SelectItem>
            </SelectContent>
          </Select>