Radio

Managed radio group and item controls for one-of-many selection.

Add it to your project

Eject the complete radio group, then import from its generated local barrel. The copied source and CSS belong to your application.

bash
pnpm exec toucan eject radio
app.tsx
import { Radio, RadioGroup } from '@/components/toucan/radio';

Use when

Users must choose exactly one visible option from a short set.

Avoid when

Multiple choices are valid or the option list is long.

Example

Plan
Basic features
Advanced features
Custom solutions

API reference

Generated from packages/react/src/components. Only Toucan-specific props are listed; forwarded native props remain available as noted for each export.

RadioRadioGroup

Radio

Props type: RadioProps

NameTypeDefaultRequiredDescription
descriptionstringundefinedNoSupporting text connected to the control.
disabledbooleanundefinedNoPrevents interaction when true.
labelstring—RequiredVisible or accessible label for the control.
valuestring—RequiredControlled value.

Also accepts the native input attributes that are not replaced by a Toucan prop.

RadioGroup

Props type: RadioGroupProps

NameTypeDefaultRequiredDescription
defaultValuestringundefinedNoInitial value when the component is uncontrolled.
descriptionstringundefinedNoSupporting text connected to the control.
disabledbooleanfalseNoPrevents interaction when true.
errorstringundefinedNoValidation error text or error state.
hideLabelbooleanundefinedNoVisually hide the label while keeping it available to assistive technology.
labelstringundefinedNoVisible or accessible label for the control.
namestringundefinedNoForm field name submitted with the control.
onChange(value: string) => voidundefinedNoCalled when the value changes.
orientation"horizontal" | "vertical"'vertical'NoHorizontal or vertical orientation.
requiredbooleanundefinedNoMarks the control as required.
valuestringundefinedNoControlled value.

Also accepts the native div attributes that are not replaced by a Toucan prop.

Type exports

RadioGroupProps, RadioProps

Accessibility

  • RadioGroup provides group labelling.
  • Arrow keys move and select options using native radio behavior.

Token families

radiofocus

Related components