OOratiq

Radio Group

Ready

One choice from a set.

Requires radix-ui

Installation

$ npx @oratiq-js/ui add radio-group

Copies the component and everything it depends on into your project, then lists the npm packages to install. The code is yours after this.

Usage

import
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";

Default

Sizes and states

Radio vs. Select

Use a radio group when there are two to five options and comparing them matters. Past that, a Select costs less vertical space and less reading.

View source on GitHub → components/ui/radio-group.tsx