---
title: "Select"
description: "Composable select primitives whose panel unfolds out of the trigger on one spring and pulls away into its own pill, plus a Morph variant where the trigger grows into the panel via shared layout."
category: "Components"
publishedAt: "2026-06-28"
updatedAt: "2026-11-25"
documentation: "https://beui.dev/components/motion/select"
markdown: "https://beui.dev/components/motion/select.md"
license: "MIT"
---

# Select

> Composable select primitives whose panel unfolds out of the trigger on one spring and pulls away into its own pill, plus a Morph variant where the trigger grows into the panel via shared layout.

## Install

### Select

Composable primitives (Select, SelectTrigger, SelectValue, SelectContent, SelectItem); the panel pinches off the trigger and separates, with a short, shared row reveal. Position-aware (opens upward when needed).

```bash
npx shadcn@latest add @beui/select
```

Docs: https://beui.dev/components/motion/select/default.md

### Morph Select

Composable primitives (MorphSelect, MorphSelectTrigger, MorphSelectValue, MorphSelectContent, MorphSelectItem) where the trigger morphs into the panel via a shared layoutId: one continuous surface that grows open and shrinks back, never detaching.

```bash
npx shadcn@latest add @beui/select-morph
```

Docs: https://beui.dev/components/motion/select/morph.md

## Dependencies

- `clsx`
- `lucide-react`
- `motion`
- `react`
- `tailwind-merge`

## Usage

### Select usage

Composable primitives (Select, SelectTrigger, SelectValue, SelectContent, SelectItem); the panel pinches off the trigger and separates, with a short, shared row reveal. Position-aware (opens upward when needed).

```tsx
"use client";

import { useState } from "react";
import {
  Select,
  SelectContent,
  SelectItem,
  SelectTrigger,
  SelectValue,
} from "@/components/motion/select";

export function SelectPreview() {
  const [value, setValue] = useState("next");
  return (
    <div className="w-56">
      <Select sound value={value} onValueChange={setValue}>
        <SelectTrigger>
          <SelectValue placeholder="Pick a framework" />
        </SelectTrigger>
        <SelectContent>
          <SelectItem value="next">Next.js</SelectItem>
          <SelectItem value="remix">Remix</SelectItem>
          <SelectItem value="astro">Astro</SelectItem>
          <SelectItem value="vite">Vite</SelectItem>
        </SelectContent>
      </Select>
    </div>
  );
}
```

### Morph Select usage

Composable primitives (MorphSelect, MorphSelectTrigger, MorphSelectValue, MorphSelectContent, MorphSelectItem) where the trigger morphs into the panel via a shared layoutId: one continuous surface that grows open and shrinks back, never detaching.

```tsx
"use client";

import { useState } from "react";
import {
  MorphSelect,
  MorphSelectContent,
  MorphSelectItem,
  MorphSelectTrigger,
  MorphSelectValue,
} from "@/components/motion/select-morph";

export function SelectMorphPreview() {
  const [value, setValue] = useState("next");
  return (
    <div className="w-56">
      <MorphSelect sound value={value} onValueChange={setValue}>
        <MorphSelectTrigger>
          <MorphSelectValue placeholder="Pick a framework" />
        </MorphSelectTrigger>
        <MorphSelectContent>
          <MorphSelectItem value="next">Next.js</MorphSelectItem>
          <MorphSelectItem value="remix">Remix</MorphSelectItem>
          <MorphSelectItem value="astro">Astro</MorphSelectItem>
          <MorphSelectItem value="vite">Vite</MorphSelectItem>
        </MorphSelectContent>
      </MorphSelect>
    </div>
  );
}
```

## API Reference

### Select

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `value` | `string` |  | No | The selected value, for controlled use. |
| `defaultValue` | `string` |  | No | The initial value when uncontrolled. |
| `onValueChange` | `((value: string) => void)` |  | No | Called with the new value when an option is picked. |
| `open` | `boolean` |  | No | Controlled open state of the panel. A layout that stacks selects can hold this to keep exactly one panel open - the panel is absolutely positioned inside its field, so two open at once paint over each other's options. |
| `defaultOpen` | `boolean` | `false` | No | Uncontrolled initial open state. Default false. |
| `onOpenChange` | `((open: boolean) => void)` |  | No | Fires whenever the panel opens or closes. The panel is absolutely positioned inside the field, so a layout that stacks selects has to know which one is open to paint it above its neighbours. |
| `disabled` | `boolean` | `false` | No | Disables the trigger so the panel cannot open. Default: false |
| `sound` | `boolean` | `false` | No | Play open and close swishes and a select on a pick. Off by default; a `SoundProvider` can mute it app-wide. |
| `className` | `string` |  | No | Classes merged onto the root element. |

### SelectTrigger

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `className` | `string` |  | No | Classes merged onto the trigger button. |

### SelectValue

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `placeholder` | `string` |  | No | Text shown while nothing is selected. Default: "Select" |
| `className` | `string` |  | No | Classes merged onto the label wrapper. |

### SelectContent

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `className` | `string` |  | No | Classes merged onto the options panel. |

### SelectItem

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `value` | `string` |  | Yes | Value reported when this option is picked. |
| `disabled` | `boolean` | `false` | No | Prevents picking this option. Default: false |
| `className` | `string` |  | No | Classes merged onto the option button. |

### MorphSelect

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `value` | `string` |  | No | The selected value, for controlled use. |
| `defaultValue` | `string` |  | No | The initial value when uncontrolled. |
| `onValueChange` | `((value: string) => void)` |  | No | Called with the option's value when the user picks one. |
| `disabled` | `boolean` | `false` | No | Disable the trigger so the panel cannot open. Default: false |
| `sound` | `boolean` | `false` | No | Play open and close swishes and a select on a pick. Off by default; a `SoundProvider` can mute it app-wide. |
| `className` | `string` |  | No | Classes merged onto the root element. |

### MorphSelectValue

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `placeholder` | `string` |  | No | Text shown in the trigger and panel header before anything is picked. Default: "Select" |
| `className` | `string` |  | No | Classes merged onto the value text. |

### MorphSelectTrigger

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `className` | `string` |  | No | Classes merged onto the trigger button. |

### MorphSelectContent

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `className` | `string` |  | No | Classes merged onto the open panel. |

### MorphSelectItem

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `value` | `string` |  | Yes | Value reported when this option is picked. |
| `disabled` | `boolean` | `false` | No | Make the option unselectable and skip it in keyboard navigation. Default: false |
| `className` | `string` |  | No | Classes merged onto the option button. |

## About Select

Select is a composable animated select menu for React built with Framer Motion and Tailwind CSS. The panel unfolds out of a lip flush with the trigger on a single spring, then pulls away into its own rounded surface, and it opens upward when there is not enough room below. A second variant, MorphSelect, grows the trigger itself into the options panel through shared layout and shrinks it back on close.

### When to use it

- A form or settings page needs a dropdown for a short list of options such as a country, plan or sort order.
- A toolbar or filter bar needs a compact picker whose open and close motion feels connected to the trigger.
- A product page or card wants a select that grows into its menu instead of opening a separate floating panel.

### Accessibility

The trigger advertises a listbox popup with aria-haspopup, aria-expanded and aria-controls, and the panel has the listbox role labelled by the trigger. Each option has the option role and an aria-selected state. Arrow Up and Arrow Down move between enabled options, Home and End jump to the ends, and typing a letter jumps to a matching option. Escape or a click outside closes the menu and returns focus to the trigger, and the closed panel is inert and hidden from assistive technology. With reduced motion enabled, the panel fades in without unfolding and its corners stay fixed.

### FAQ

**How do I make a custom animated select in React?**

Install the component and compose Select, SelectTrigger, SelectValue, SelectContent and SelectItem. Give each SelectItem a value and its label as children, and pass a placeholder to SelectValue.

**Can I control the selected value and open state?**

Yes. Use value and onValueChange for the selection, or defaultValue to let Select manage it. The open state works the same way with open, defaultOpen and onOpenChange.

**What is the difference between Select and MorphSelect?**

Select unfolds a panel out of the trigger and separates it, while MorphSelect (installed as select-morph) turns the trigger itself into the panel with a shared layout animation. MorphSelect composes with MorphSelectTrigger, MorphSelectValue, MorphSelectContent and MorphSelectItem.

## React Native

A React Native version ships in beUI Native. The detail JSON has every file to copy.

```bash
npx expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-worklets
npm install uniwind tailwindcss
```

- Native detail: https://beui.dev/native/r/select
- GitHub: https://github.com/starc007/beui-native/tree/main/src/components/select

## Source

- Registry detail: https://beui.dev/r/select
- Raw source: https://beui.dev/r/select/raw
- GitHub: https://github.com/starc007/ui-components
