Components
- Accordion
- Action Bar
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- Badge
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context Menu
- Data List
- Date Picker
- Dialog
- Drawer
- Editable
- Field
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- Marquee
- Menu
- Native Select
- Number Input
- Pagination
- Popover
- Progress
- Prose
- QR Code
- Radio Group
- Rating
- Resizable
- Scroll Area
- Segment Group
- Select
- Separator
- Sheet
- Sidebar
- Signature Pad
- Skeleton
- Skip Nav
- Slider
- Spinner
- Status
- Steps
- Switch
- Table
- Tabs
- Textarea
- Timer
- Toast
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
Installation
pnpm dlx shadcn@latest add https://shark.vini.one/r/radio-group.json
Usage
import { RadioGroup, RadioGroupItem, } from "@/components/ui/radio-group";
<RadioGroup> <RadioGroupItem value="item-1">{/* label */}</RadioGroupItem> <RadioGroupItem value="item-2">{/* label */}</RadioGroupItem> </RadioGroup>
Controlled
Use the value and onValueChange props to control the radio group.
Select the option comfortable
❌
State
Invalid
Use the invalid prop on <RadioGroup /> to indicate an invalid state.
Disabled
Use the disabled on <RadioGroup /> to disable all the radio group items or on <RadioGroupItem /> to disable a single item.
Examples
With Description
Use <FieldDescription /> to add a description to the radio group.
Standard spacing for most use cases.
More space between elements.
Minimal spacing for dense layouts.
Card Style
Use <FieldLabel /> to wrap the entire <Field /> for a clickable card-style selection.
For growing businesses.
For large teams and enterprises.
API Reference
RadioGroup
Root component. Manages single selection from options.
| Prop | Type | Default |
|---|---|---|
value | string | - |
defaultValue | string | - |
disabled | boolean | false |
name | string | - |
onValueChange | (details: ValueChangeDetails) => void | - |
className | string | - |
RadioGroupItem
Single radio option. Use value for selection.
| Prop | Type | Default |
|---|---|---|
value | string | - |
disabled | boolean | false |
invalid | boolean | false |
className | string | - |
For a complete list of props, see the Ark UI documentation.