PrimitivesSelect
Select
Native select input for form and model settings.
Select ships with a full API table, a copyable example, and accessibility notes.
tsx
Installation
Install the package once, then import Select from its direct entry point or from the root.
bash
pnpm add @agent-ui/reacttsx
import { Select } from "@agent-ui/react/select";Tailwind CSS v4 users: add @source "../node_modules/@agent-ui/react/src" to the global stylesheet so the library utilities are generated.
Usage
The example below is the same code that renders the preview. Copy it, swap in your own handlers, and ship.
tsx
import { Select } from "@agent-ui/react"; <Select aria-label="Quality" defaultValue="fast"> <option value="fast">Fast</option> <option value="precise">Precise</option></Select>API reference
Every prop Select accepts, its type, default, and behaviour.
| Name | Type | Default | Description |
|---|---|---|---|
| value | string | — | Controlled selection. |
| onChange | ChangeEventHandler<HTMLSelectElement> | — | Selection change. |
Accessibility
Native select keyboard, touch, focus, and screen reader behavior.
Use it with the rest of the library
Select composes with MessageList, ChatShell, useChat, and the provider compose blocks. Browse the full reference or see all components in the gallery.
6 lines · copy-ready