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.
pnpm add @heyramzi/ui bits-ui
import * as RadioGroup from "@heyramzi/ui/shadcn/radio-group";
<RadioGroup.Root value="comfortable">
<RadioGroup.Item value="default" id="r1" />
<label for="r1">Default</label>
<RadioGroup.Item value="comfortable" id="r2" />
<label for="r2">Comfortable</label>
</RadioGroup.Root>
- With orientation="horizontal", ArrowRight and ArrowLeft move instead.
- Until something is checked, the arrow keys only move focus.
- Focus loops from the last item back to the first unless loop is false.
ref bindable HTMLElement | null - Default
null class string value bindable string - Default
"" ...rest - Every prop of
RadioGroup.Root from bits-ui
ref bindable HTMLElement | null - Default
null class string ...rest - Every prop of
RadioGroup.Item from bits-ui except child, children