Components
RadioGroup
A group of radio buttons for single-option selection.
Loading...
Installation
NPM packages are currently unstable and may cause issues. Use it at your own risk.
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>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. |