Skip to content

Radio Group

InputMIT
View in Storybook

Single-choice radio button group with label, helper text, and disabled states.

bun add @otfdashkit/ui

Preview

Radio Group
Loading Storybook preview…

Code

import { RadioGroup, RadioGroupItem } from '@otfdashkit/ui'

export function Example() {
  return (
    <RadioGroup defaultValue="option-one">
      <div className="flex items-center gap-2">
        <RadioGroupItem value="option-one" id="o1" />
        <label htmlFor="o1" className="text-sm">Option one</label>
      </div>
      <div className="flex items-center gap-2">
        <RadioGroupItem value="option-two" id="o2" />
        <label htmlFor="o2" className="text-sm">Option two</label>
      </div>
    </RadioGroup>
  )
}

Free with the SDK. This component ships in @otfdashkit/ui under the MIT license.