rokle

Personality

20
40
70
15

Active brand: Meridian

Adjust sliders to see every component on the page respond in real time.

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/tokens

Installs 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

PropTypeDefaultDescription
items{ label: string; value: string }[]-Radio options.
valuestring-Currently selected value.
onValueChange(value: string) => void-Called when selection changes.