Radio Group

ProgressRating

Pick one option from a set, as a list or cards.

Notify me about

Installation

pnpm add krz-ui

Usage

import { RadioGroup } from "krz-ui";
<RadioGroup
  label="Plan"
  defaultValue="pro"
  options={[
    { value: "free", label: "Free" },
    { value: "pro", label: "Pro" },
  ]}
/>

API Reference

PropTypeDescription
optionsRadioOption[]Options with value, label, description and disabled.
value / defaultValuestringControlled or initial value.
onValueChange(value: string) => voidCalled when the selection changes.
orientation"vertical" | "horizontal"Layout direction.
variant"default" | "cards"Render options as selectable cards.
label / name / disabledReactNode / string / booleanGroup label, form name and disabled state.
className / style / ref—All go to the outer element. See Customization.
classNames{ label?, options?, option?, circle?, optionLabel?, description? }Extra classes for inner parts.