byronwade/ui
Application UI

Forms · Application UI

Radio Group

A radio group component built on Base UI primitives that renders a group of mutually exclusive radio buttons in a vertical grid layout.

Feature showcase

Installation

Features

  • 6 examples

    Default, Disabled, Form Validation, Horizontal, With Description, With Icon.

API

Props

PropTypeDefaultDescription
valueValue-The controlled value of the currently selected radio item.
defaultValueValue-The uncontrolled default selected value on initial render.
onValueChange(value: Value, eventDetails: RadioGroup.ChangeEventDetails) => void-Callback fired when the selected value changes.
disabledbooleanfalseWhether the component should ignore user interaction.
readOnlybooleanfalseWhether the user should be unable to select a different radio button in the group.
requiredbooleanfalseWhether the user must choose a value before submitting a form.
namestring-Identifies the field when a form is submitted.
classNamestring-Additional CSS class names to apply to the group container.

Source and related

FilePath
Componentregistry/ui/radio-group.tsx
Default examplecontent/examples/radio-group/default.tsx
Disabled examplecontent/examples/radio-group/disabled.tsx
Form Validation examplecontent/examples/radio-group/form-validation.tsx
Horizontal examplecontent/examples/radio-group/horizontal.tsx
With Description examplecontent/examples/radio-group/with-description.tsx
With Icon examplecontent/examples/radio-group/with-icon.tsx