1. Docs
  2. Components
  3. Select

Select

A select displays a collapsible list of options and allows a user to select one of them.

Installation

The Select is built using a composition of the <Popover /> and the <Listbox /> components.

See installation instructions for the Popover and the Listbox components.

npx shadcn@latest add @kanpeki/select

Anatomy

import { Listbox } from "~/components/ui/list-box";
import { Popover } from "~/components/ui/popover";
import { Select } from "~/components/ui/select";

<Select.Root>
  <Select.Trigger>
    <Select.Value />
  </Select.Trigger>
  <Popover.Content>
    <Listbox.Root>
      <Listbox.Item></Listbox.Item>
    </Listbox.Root>
  </Popover.Content>
</Select.Root>

Examples

With Label

Scrollable

Infinite Scroll

Multiple Selection

Form