Component
Select
Lets a user choose one option from a native menu.
Install
Run the CLI to copy the source into your project.
pnpm dlx @stalk-ui/cli add @stalk-ui/selectExamples
Live previews render through the docs app's PandaCSS codegen.
<Select.Root> <Select.Trigger aria-label="Status"> <Select.Value placeholder="Choose a status" /> </Select.Trigger> <Select.Content> <Select.Item value="draft">Draft</Select.Item> <Select.Item value="published">Published</Select.Item> <Select.Item value="archived">Archived</Select.Item> </Select.Content> </Select.Root>
<Select.Root> <Select.Trigger invalid aria-label="Status"> <Select.Value placeholder="Required" /> </Select.Trigger> <Select.Content> <Select.Item value="draft">Draft</Select.Item> </Select.Content> </Select.Root>
<Select.Root disabled> <Select.Trigger aria-label="Locked"> <Select.Value placeholder="Locked" /> </Select.Trigger> <Select.Content> <Select.Item value="locked">Locked</Select.Item> </Select.Content> </Select.Root>
Props
Public component props extracted from the source TypeScript types.
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
| `endContent` | `ReactNode` | No | - | Trailing content aligned to the inline-end of the option (e.g. meta/shortcut). |
| Prop | Type | Required | Default | Description |
| `invalid` | `boolean` | No | - | - |
| `size` | `SelectSize` | No | - | - |
Variants
Variant axes exposed by the underlying PandaCSS recipe or slot recipe.
| Variant | Values |
|---|---|
| `size` | `sm`, `md`, `lg` |
Registry
Files this component contributes to your registry install.
- Manifest: `/r/select.json`
- Recipe: `select`
- Files: `src/components/ui/select.tsx`