The library is still in early development. Breaking changes and bugs may occur without prior notice. Thanks for your interest in using the library!

Search

Radio Group

Source

A group of radio buttons for selecting a single option.

Usage

Import the RadioGroup and RadioGroupItem components from @bun-ui/react and use them in your project:

import { RadioGroup, RadioGroupItem } from "@bun-ui/react"
<RadioGroup>
  <RadioGroupItem value="option1" label="Option 1" />
  <RadioGroupItem value="option2" label="Option 2" />
  <RadioGroupItem value="option3" label="Option 3" />
</RadioGroup>

Controlled

Use the value and onValueChange props to control the selected value programmatically.

Disabled

Customization

The RadioGroup and RadioGroupItem components can be customized using the className prop or by extending their styles with your design system.

Refer to the source code for more advanced usage and customization options.