Components
RadioGroup
Radio group selection.
Use RadioGroup to let users pick one of several options.
import { RadioGroup, RadioGroupItem } from '@tile-ui/vue';
export default function RadioGroupDemo() {
return (
<RadioGroup defaultValue="a" orientation="horizontal">
<RadioGroupItem value="a">Email</RadioGroupItem>Registry install
pnpm dlx shadcn@latest add @tile-ui/radio-groupPackage usage
import { RadioGroup, RadioGroupItem } from '@tile-ui/vue';
<RadioGroup defaultValue="a">
<RadioGroupItem value="a" />
<RadioGroupItem value="b" />
</RadioGroup>Highlights
- Controlled and uncontrolled
- Horizontal and vertical
- Item disabled
Registry dependencies
| Item | Purpose |
|---|---|
radio-group |
Component source and module styles |
core |
Framework-agnostic logic helpers |
styles |
Shared SCSS tokens and globals |
API reference
RadioGroup
| Prop | Type | Default |
|---|---|---|
value |
string |
— |
defaultValue |
string |
— |
onValueChange |
(value: string) => void |
— |
orientation |
'horizontal' | 'vertical' |
— |
name |
string |
— |
disabled |
boolean |
— |
RadioGroupItem
| Prop | Type | Default |
|---|---|---|
value |
string |
— |
disabled |
boolean |
— |