---
title: "Native Select"
description: "A select that opens the built-in list of the browser or the phone. It has the look of Select and works in a Field with a label and errors."
url: https://gelatinui.com/components/native-select
markdown_url: https://gelatinui.com/components/native-select.md
access: free
install: "npx shadcn@latest add @gelatin-ui/native-select"
registry_item: https://gelatinui.com/r/native-select.json
version: "2026-11-08"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Native Select

> A select that opens the built-in list of the browser or the phone. It has the look of Select and works in a Field with a label and errors.

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

## When to use it

Best for: A short fixed list where the browser or phone picker is the best list.

- Use it on phones, where the system picker is easy to use.
- Use it in a form that must work before the JavaScript loads.
- Put it in a `Field`, so the label, description, and errors reach it.

## When not to use it

- For search, icons, rich rows, or a read-only state, use a [Select](https://gelatinui.com/components/select.md).
- To type and filter a long list, use a [Combobox](https://gelatinui.com/components/combobox.md).

## Notes for agents

- `onValueChange` gives the new value as a string.
- `htmlSize` over 1 with no `multiple` shows an open list box.
- The sizes are the Select sizes: `xs`, `sm`, `default`, and `lg`.

## Anatomy

```text
NativeSelect
├─ NativeSelectOption (0..n)
└─ NativeSelectOptGroup (0..n)
```

## API reference

### NativeSelect

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `size` | `"default" \| "lg" \| "sm" \| "xs"` | "default" |  |
| `className` | `string` |  | Classes for the wrapper. It sets the width (`w-full` by default; shadcn: `w-fit`). |
| `htmlSize` | `number` |  | The native `size` attribute: how many rows the list box shows. Over 1, the select is a list box (with or without `multiple`) and gets the list-box look, with no chevron. The `size` prop is the control size (`xs`, `sm`, `default`, `lg`), as on every form component. |

Also takes every prop of Base UI `Field.Control`: https://base-ui.com/react/components/field

### NativeSelectOption

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### NativeSelectOptGroup

No props of its own: `className`, `children`, and every other prop go to the element it renders.

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| NativeSelect | `native-select` | `data-disabled`, `data-list-box` |  |  |
| NativeSelectOption | `native-select-option` |  |  |  |
| NativeSelectOptGroup | `native-select-optgroup` |  |  |  |

## Usage

Import Native Select and compose its parts.

```tsx title="native-select.tsx"
import { NativeSelectOption, NativeSelect } from "@/components/ui/native-select";

export function NativeSelectDemo() {
  return (
    <NativeSelect size="xs" aria-label="Currency" defaultValue="eur" className="w-20">
      <NativeSelectOption value="eur">EUR</NativeSelectOption>
      <NativeSelectOption value="usd">USD</NativeSelectOption>
      <NativeSelectOption value="gbp">GBP</NativeSelectOption>
    </NativeSelect>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

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

It adds 7 registry items: 3 files, 1271 lines, and the npm packages `@base-ui/react`, `@phosphor-icons/react`, `clsx`, `tailwind-merge`, `tailwind-variants`.

## 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

- [Select](https://gelatinui.com/components/select.md)
- [Combobox](https://gelatinui.com/components/combobox.md)
- [Field](https://gelatinui.com/components/field.md)

## Keyboard

| Keys | Action |
| --- | --- |
| Space, ↑ ↓ | Opens the list of the browser. |
| Tab | Moves focus to the next control. |

## Accessibility

It is a real `select` element, so the browser and the screen reader know it.

A `Field` label names it, and a click on the label focuses it.
