Radio group

Playground

Properties

Orientation
Disabled

Usage

Use RadioGroup when only one option can be selected. Give each RadioGroupItem a unique value.

'use client';
import { RadioGroup, RadioGroupItem } from '@mbsw/ui';

export default function Example() {
  return (
    <RadioGroup defaultValue="0" aria-label={"Choose an option"}>
      <label>
        <RadioGroupItem value="0" /> A
      </label>
      <label>
        <RadioGroupItem value="1" /> B
      </label>
    </RadioGroup>
  );
}

The Playground Code tab includes the full example with your current settings. See Installation for the CSS imports.

Composition