Docs
Radio Group

Radio Group

A set of checkable buttons—known as radio buttons—where no more than one of the buttons can be checked at a time.

Usage

import { Label, RadioGroup } from '@bit/ui'
<RadioGroup.Root defaultValue='comfortable'>
  <div className='flex items-center space-x-2'>
    <RadioGroup.Item value='default' id='r1' />
    <Label htmlFor='r1'>Default</Label>
  </div>
  <div className='flex items-center space-x-2'>
    <RadioGroup.Item value='comfortable' id='r2' />
    <Label htmlFor='r2'>Comfortable</Label>
  </div>
  <div className='flex items-center space-x-2'>
    <RadioGroup.Item value='compact' id='r3' />
    <Label htmlFor='r3'>Compact</Label>
  </div>
</RadioGroup.Root>

Examples

With react-hook-form and zod

Notifications can be blocked entirely in your settings