Skip to content

Radio Group

Form

Group of radio buttons for single-select from multiple options.

Controlled selectionThree options
Open preview

Responsive viewport — resize the window to explore. Direction and density apply only to this preview. Theme applies to the docs too.

Usage

Use a radio group for one choice from a short list. Render RadioGroupItem with a unique id and a Label for each option.

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

Available in the included @dashboardpack/core package. Copy the complete example from Source code for all imports and state. Add "use client" when using hooks or event handlers. See installation and theming for project setup.

API reference

Common props and defaults. Slot-specific props are named below; native elements also accept their standard HTML attributes. The component TypeScript definitions are the complete type reference.

Radio Group props
PropType / DefaultDescription
value / defaultValuestring

Default: —

Controlled or initial selected value.
onValueChange(value: string) => void

Default: —

Handle selection changes.
orientationhorizontal | vertical

Default: —

Set keyboard navigation orientation.
disabledboolean

Default: false

Disable the group.

Build with these too