Component
Radio
Selects one option from a related set of choices.
Install
Run the CLI to copy the source into your project.
pnpm dlx @stalk-ui/cli add @stalk-ui/radioExamples
Live previews render through the docs app's PandaCSS codegen.
<Radio.Root defaultValue="basic" name="plan"> <Radio.Item value="basic" aria-label="Basic" /> <Radio.Item value="pro" aria-label="Pro" /> <Radio.Item value="team" aria-label="Team" /> </Radio.Root>
<Radio.Root name="plan-invalid"> <Radio.Item invalid value="required" aria-label="Required choice" /> </Radio.Root>
Props
Public component props extracted from the source TypeScript types.
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
| `invalid` | `boolean` | No | - | Marks the radio as invalid; sets \`aria-invalid\` and applies invalid styling. |
| `size` | `RadioSize` | 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/radio.json`
- Recipe: `radio`
- Files: `src/components/ui/radio.tsx`