# Native Select

> A styled native select for forms and phones: the platform's own picker and keyboard handling in the same shell as the other selects. Label, hint, description and error, a custom chevron, a leading icon, a greyed placeholder, optgroups, disabled options and three sizes, with no JavaScript beyond React.

- Slug: `native-select`
- Category: [Selects](https://www.assembli.design/category/selects.md)
- Type: component
- Tags: select, native, form, optgroup, mobile, accessible
- npm dependencies: lucide-react
- shadcn/ui dependencies: none
- Live preview: https://www.assembli.design/preview/native-select
- Page: https://www.assembli.design/components/native-select

![Native Select preview](https://www.assembli.design/thumbnails/native-select-light.png)

## Props

Other props pass through to the root element.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `options` | `(NativeSelectOption \| NativeSelectGroup)[]` |  | Options or `<optgroup>` groups. Or pass `<option>` children yourself. |
| `label` | `React.ReactNode` |  |  |
| `hint` | `React.ReactNode` |  | Quiet text to the right of the label, such as "Optional". |
| `description` | `React.ReactNode` |  |  |
| `error` | `React.ReactNode` |  | Replaces the description and marks the select `aria-invalid`. |
| `placeholder` | `string` |  | Shown, greyed, until something is picked. Renders an empty, unpickable first option. |
| `leading` | `React.ReactNode` |  | An icon inside the field, before the value. |
| `size` | `SelectSize` | `"md"` |  |
| `selectClassName` | `string` |  | Classes for the `<select>` itself; `className` goes on the root. |

## Install

One-time setup (needs a subscription):

1. Add the registry to the project's `components.json`: `{"@assembli":{"url":"https://www.assembli.design/r/{name}.json","headers":{"Authorization":"Bearer ${ASSEMBLI_API_KEY}"}}}` (merge into `"registries"`).
2. Put an API key from https://www.assembli.design/account in `.env.local` as `ASSEMBLI_API_KEY=asm_…`.

Then install with the shadcn CLI (writes `components/native-select/native-select.tsx` and installs dependencies):

```bash
npx shadcn@latest add @assembli/native-select
```

Registry item JSON: https://www.assembli.design/r/native-select.json (send `Authorization: Bearer <api key>`)

## Code

> Component source needs an Assembli subscription ($12/month or $96/year) and an API key sent as `Authorization: Bearer <key>`. To get one without copying anything, POST https://www.assembli.design/api/agent/login (or call the MCP tool connect_account), show the user the link it returns, and poll https://www.assembli.design/api/agent/token for the key. Or subscribe at https://www.assembli.design/pricing and create a key at https://www.assembli.design/account.
