RadioGroup
Group of mutually exclusive radio button options with accessible keyboard navigation.
Examples
Default
Radio buttons with descriptions.
Horizontal
Radio buttons in a horizontal layout.
Disabled
Card Style
Radio buttons styled as selectable cards.
With Description
Each radio option has a supporting description.
Invalid
Radio group with error state.
Installation
pnpm add @rokle/components @rokle/tokensInstalls with the default Rokle brand. Generate a custom brand on rokle.app to use your own colours and personality.
Usage
import { RadioGroup } from "@rokle/components";import { RadioGroup } from "@rokle/components";
export function Example() {
return <RadioGroup />;
}API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| items | { label: string; value: string }[] | - | Radio options. |
| value | string | - | Currently selected value. |
| onValueChange | (value: string) => void | - | Called when selection changes. |