---
title: "Select"
description: "Pick one value, or several, from a list that opens under the field. The field has the look of Input, and the list works the same on every device."
url: https://gelatinui.com/components/select
markdown_url: https://gelatinui.com/components/select.md
access: free
install: "npx shadcn@latest add @gelatin-ui/select"
registry_item: https://gelatinui.com/r/select.json
version: "2026-11-08"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Select

> Pick one value, or several, from a list that opens under the field. The field has the look of Input, and the list works the same on every device.

Page: https://gelatinui.com/components/select

## When to use it

Best for: Pick one value or several from a list that opens under a trigger, with no typing.

- Use it for a list that people can read through with no search.
- Use `multiple` to pick several values.
- Use `SelectGroup` and `SelectGroupLabel` to group the items.
- Use a `null` item to let people clear the value.

## When not to use it

- For a long list that needs search, use a [Combobox](https://gelatinui.com/components/combobox.md).
- For free text with suggestions, use an [Autocomplete](https://gelatinui.com/components/autocomplete.md).
- For a few options that all stay in view, use a [Segmented Control](https://gelatinui.com/components/segmented-control.md).
- For a list of actions, use a Menu.

## Notes for agents

- Pass `items` (value to label) so `SelectValue` shows the label, not the raw value.
- For object values, pass `itemToStringValue`.
- Pass `label` on `SelectItem` when its children are not plain text, so typing a letter still finds the item.
- `SelectLabel` is a `<div>`, not a `<label>`. Inside a `Field`, use it in place of `FieldLabel`.
- `alignItemWithTrigger` is off and is not a prop. The popup opens below the trigger on every device.
- `SelectContent` renders the scroll strips. Change them with `scrollUpButtonProps` and `scrollDownButtonProps`.
- A read-only Select shows no chevron, because it cannot open.

## Anatomy

```text
Select
├─ SelectLabel (0..n)
├─ SelectTrigger (0..n)
├─ SelectValue (0..n)
├─ SelectScrollUpButton (0..n)
├─ SelectScrollDownButton (0..n)
├─ SelectContent (0..n)
├─ SelectItem (0..n)
├─ SelectGroup (0..n)
├─ SelectGroupLabel (0..n)
└─ SelectSeparator (0..n)
```

## API reference

### Select

Also takes every prop of Base UI `Select.Root`: https://base-ui.com/react/components/select

### SelectTrigger

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `size` | `"default" \| "lg" \| "sm" \| "xs"` |  |  |
| `className` | `string` |  |  |

Also takes every prop of Base UI `Select.Trigger`: https://base-ui.com/react/components/select

### SelectScrollUpButton

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |

Also takes every prop of Base UI `Select.ScrollUpArrow`: https://base-ui.com/react/components/select

### SelectScrollDownButton

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |

Also takes every prop of Base UI `Select.ScrollDownArrow`: https://base-ui.com/react/components/select

### SelectContent

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |
| `arrow` | `boolean` | false | Show an arrow that points at the trigger. The gap grows from 4px to 8px. |
| `backdrop` | `boolean` | false | Put a clear layer under the popup (Base UI `Select.Backdrop`), for example to dim it. |
| `portalProps` | `Omit` |  | Other Base UI props of the inner parts. A `className` here adds to the component classes. |
| `positionerProps` | `PopupPartProps` |  |  |
| `backdropProps` | `PopupPartProps<SelectBackdropProps>` |  |  |
| `arrowProps` | `PopupPartProps<SelectArrowProps>` |  |  |
| `listProps` | `PopupPartProps` |  |  |
| `scrollUpButtonProps` | `SelectScrollUpButtonProps` |  |  |
| `scrollDownButtonProps` | `SelectScrollDownButtonProps` |  |  |

Also takes every prop of Base UI `Select.Popup`: https://base-ui.com/react/components/select

### SelectItem

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |

Also takes every prop of Base UI `Select.Item`: https://base-ui.com/react/components/select

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| SelectLabel | `select-label` |  |  |  |
| SelectTrigger | `select-trigger` | `data-popup-open`, `data-readonly`, `data-size` |  |  |
| SelectValue | `select-value` | `data-placeholder` |  |  |
| SelectScrollUpButton | `select-scroll-up-button` |  |  |  |
| SelectScrollDownButton | `select-scroll-down-button` |  |  |  |
| SelectContent | `select-content` |  | `--anchor-width`, `--available-height`, `--available-width` |  |
| SelectItem | `select-item` | `data-ending-style`, `data-starting-style` |  | `motion-timing` |
| SelectGroup | `select-group` |  |  |  |
| SelectGroupLabel | `select-group-label` |  |  |  |
| SelectSeparator | `select-separator` |  |  |  |

## Usage

Pass `items` (value to label), so `SelectValue` shows the label and not the raw value.

The sample also uses `field`, which this add does not write. One command adds them with this item:

```bash
npx shadcn@latest add @gelatin-ui/select @gelatin-ui/field
```

```tsx title="role-select.tsx"
import { Field } from "@/components/ui/field";
import {
  Select,
  SelectContent,
  SelectItem,
  SelectLabel,
  SelectTrigger,
  SelectValue,
} from "@/components/ui/select";

export function RoleSelect() {
  return (
    <Field>
      <Select items={{ viewer: "Viewer", editor: "Editor", admin: "Admin" }} defaultValue="editor">
        <SelectLabel>Role</SelectLabel>
        <SelectTrigger>
          <SelectValue placeholder="Pick a role" />
        </SelectTrigger>
        <SelectContent>
          <SelectItem value="viewer">Viewer</SelectItem>
          <SelectItem value="editor">Editor</SelectItem>
          <SelectItem value="admin">Admin</SelectItem>
        </SelectContent>
      </Select>
    </Field>
  );
}
```

## Compose

Build it with:

- [Sidebar](https://gelatinui.com/components/sidebar.md): Moves between the settings sections.
- [Frame](https://gelatinui.com/components/frame.md): Groups the fields of one section, with Save in its footer.
- [Field](https://gelatinui.com/components/field.md): Names each control and shows its help or error text.
- [Switch](https://gelatinui.com/components/switch.md): Turns one setting on or off at once.
- [Button](https://gelatinui.com/components/button.md): Saves the section or opens a dialog.
- [Toast](https://gelatinui.com/components/toast.md): Confirms the save.

Rules:

- Group with a Frame (`group-in-frames`): Put related panels in one `Frame` with its header and footer outside the panels, and keep a plain `Card` for one block of content.
- Name every control (`label-every-control`): Give every field a visible `Label` (or a `Field`), and every icon button a `Tooltip` or an `aria-label`.
- Labels real apps use (`real-labels`): Write the button and menu labels that real apps use ("Create API key", "Invite members"), with no "…" at the end.
- No layout jump (`no-layout-jump`): When a state change adds, removes, or resizes content, reserve its space or animate its size, so nothing below it jumps.

Patterns: `gelatin://patterns/settings-page`

## Add it

```bash
npx shadcn@latest add @gelatin-ui/select
```

It adds 23 registry items: 20 files, 3697 lines, and the npm packages `@base-ui/react`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`.

## Built on

- [Animated Chevrons Up Down Icon](https://gelatinui.com/components/animated-chevrons-up-down-icon.md)
- [Separator](https://gelatinui.com/components/separator.md)

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Combobox](https://gelatinui.com/components/combobox.md): Pick Combobox for a long list that people filter by typing before they pick.
- [Segmented Control](https://gelatinui.com/components/segmented-control.md)
- [Field](https://gelatinui.com/components/field.md)
- [Autocomplete](https://gelatinui.com/components/autocomplete.md): Pick Autocomplete when free text is a valid value and the list only suggests.
- [Menu](https://gelatinui.com/components/menu.md): Pick Menu for a list of actions that run at once, not for a value that a form sends.

## Keyboard

| Keys | Action |
| --- | --- |
| Enter, Space | On the trigger, opens the list. In the list, picks the highlighted item. |
| Down Arrow, Up Arrow | Opens the list, then moves the highlight. |
| Letters | On the closed trigger, picks the matching item. In the open list, moves the highlight to it. |
| Escape | Closes the list. |

## Accessibility

It is a Base UI Select. The trigger is a combobox, and the popup is a listbox.

`SelectLabel` names the trigger. A press on it focuses the trigger and does not open the list.

A letter key jumps to the item that starts with it. Pass `label` on an item whose children are not plain text.

## Motion

| Part | Motion |
| --- | --- |
| Open | popup · 150ms · ease-panel (0.2, 0.4, 0.2, 1) · fades in and scales from 95% |
| Close | popup-exit · 120ms · ease-out (0, 0, 0.2, 1) |
