sigilUI

Select

Choose an option from an accessible popover list.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

import { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectItem, SelectLabel, SelectSeparator } from "@sigil-ui/components";

Usage

<Select>
    <SelectTrigger className="w-48">
      <SelectValue placeholder="Choose option" />
    </SelectTrigger>
    <SelectContent>
      <SelectItem value="a">Option A</SelectItem>
      <SelectItem value="b">Option B</SelectItem>
    </SelectContent>
  </Select>

Sub-components

This component includes the following parts:

  • <SelectGroup>
  • <SelectValue>
  • <SelectTrigger>
  • <SelectContent>
  • <SelectItem>
  • <SelectLabel>
  • <SelectSeparator>

Token integration

CSS VariablePurpose
--s-input-heightInput height
--s-radius-inputRadius input
--s-radius-mdRadius md
--s-border-styleBorder style
--s-backgroundBackground
--s-duration-fastDuration fast
--s-surfaceSurface
--s-text-mutedText muted
--s-errorError
--s-borderBorder
--s-primaryPrimary
--s-card-radiusCard radius