Skip to content

Early previewhamur is not on npm yet. The components are being built in the open, follow along on GitHub.

UIComponentsReact

Radio Group

A set of options of which the reader picks one.

Built on the headless Radio Group.See its API in Docs

Rendered by React 19.3.1

radio-group.tsx

Installation

npx shadcn@4.23.0 add https://hamur.dev/r/react/radio-group.json

It also adds utils. The app needs its setup first: Installation.

Usage

Each RadioGroupItem has a value; the group holds the chosen one in value or defaultValue. Arrow keys move between items, as in the headless Radio Group.

import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group'

Examples

Default

Three options with labels.

Its preview and code are at the top of the page.

API reference

The styled parts pass every prop to the headless part they wrap and add classes. The props, data attributes and keyboard are on Radio Group's API reference.