Radio group
Picks one of two to six choices that are each shown with their words, and sends the pick with the form when it is saved.
Examples
Filing alerts
When we tell you about new filings from advisers you watch.
Variants
States
Choose who is staying, so the host knows whose name to expect.
Usage
Use it when
- A form choice of one out of two to six, where each choice needs its words in view, such as a cancellation policy or how often alerts arrive.
- A choice with a line of detail that helps pick, such as what each plan costs.
Use something else when
- Two to four options that change the view at once, with nothing to save. Use SegmentedControl instead.
- More than six options, or options you find by typing. Use Select or Combobox instead.
- One choice that is on or off. Use Checkbox instead, or Switch when it acts at once.
- Several choices may be picked. Use a column of Checkbox rows instead.
Rules
General
Content
Avoid
Limits
Install
npx shadcn@latest add https://kaanarici.com/r/cobalt/radio-group.jsonimport { RadioGroup, RadioGroupItem, Radio } from "@/components/cobalt/ui/radio-group"Related
- Pillone flat choice on or off, such as a filter.
- Cardthe surface a settings group sits on.
- EmojiPickerfinds an emoji by name or group and picks it, with a keyboard grid, a recent row and skin tones.
- Reactionsthe emoji people reacted with under a message, each a toggle with its count, and a button to add one.
