Components
RadioGroup
A group of radio buttons for single-option selection.
Installation
npm install @mijn-ui/react-radio-groupUsage
import { Label } from "@mijn-ui/react-label"
import { RadioGroup, RadioGroupItem } from "@mijn-ui/react-radio-group"<RadioGroup defaultValue="option-one">
<div className="flex items-center space-x-2">
<RadioGroupItem value="option-one" id="option-one" />
<Label htmlFor="option-one">Option One</Label>
</div>
<div className="flex items-center space-x-2">
<RadioGroupItem value="option-two" id="option-two" />
<Label htmlFor="option-two">Option Two</Label>
</div>
</RadioGroup>API Reference
Built on Radix UI — all underlying primitive props are forwarded in addition to the props below.
| Prop | Type | Default | Description |
|---|---|---|---|
unstyled | boolean | false | Opt out of the default styles to fully customize the component. |
classNames | object | — | Override classes per slot (see Style Slots below). |
className | string | — | Additional classes for the root element. |
RadioGroup Style Slots
| Slot Name | Targeted Component | Purpose |
|---|---|---|
base | RadioGroup | Styles the root radio group component. |
item | RadioGroupItem | Styles individual radio items. |
indicator | RadioGroupItem | Styles the indicator for selected radio items. |
icon | RadioGroupItem | Styles the icon within the radio item. |