RadioGroup

A radio button group component for selecting a single value from a list of options. Supports descriptions per option, disabled state, and a custom render function for labels.

Import

import { RadioGroup } from '@wavebooking/aqua-fusion';

Preview

Loading preview...

Usage

<RadioGroup
  name="plan"
  options={[
    { value: 'free', label: 'Free' },
    { value: 'pro', label: 'Pro', description: 'Unlimited access' },
    { value: 'enterprise', label: 'Enterprise' },
  ]}
  value={selected}
  onChange={(value) => setSelected(value)}
/>

Props

PropTypeDefaultDescription
options*RadioOption[]-Array of options. Each option has a value, label, and optional description.
valuestring-The currently selected value (controlled).
onChange(value: string) => void-Callback fired when the selected value changes.
namestring-HTML name attribute shared by all radio inputs in the group.
disabledbooleanfalseWhether all radio options are disabled.
renderLabel(option: RadioOption) => ReactNode-Custom render function for option labels.
classNamestring-Additional CSS classes for the group container.
classNameOptionstring-Additional CSS classes applied to each option wrapper.

RadioOption

PropertyTypeDescription
valuestringThe value of the option.
labelstringDisplay text for the option.
descriptionstringOptional description text below the label.