Radio Group
Single choice among options.
Import
tsx
import { RadioGroup } from "@cronus-ui/ui";
bash
npx cronus-ui add radio-group
Examples
.cronus
The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.
default.cronus
app "audit-fixtures" {
port 5176
}
style {
preset aurora
theme dark
}
component RadioGroupDefault layout:inline style:radio-group {
value:"Pro"
aria-label:"Plan"
label "Plan"
text "Free"
text "Pro"
}
page "/audit/radio-group/default" type:custom {
use RadioGroupDefault
}
API Reference
Generated from the component's exported types.
RadioGroupProps
Extends ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | Controlled value. |
defaultValue | string | — | Uncontrolled initial value. |
onValueChange | (value: string) => void | — | Called when the value changes. |
disabled | boolean | — | Disables pointer and keyboard interaction. |
required | boolean | — | Marks the control as required. |
name | string | — | Submitted name when used in a form. |
orientation | "horizontal" | "vertical" | — | — |
dir | "ltr" | "rtl" | — | Reading direction. Inherits from the document when omitted. |
loop | boolean | — | When true, keyboard navigation wraps around the ends. |
RadioGroupItemProps
Extends ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | Controlled value. |
disabled | boolean | — | Disables pointer and keyboard interaction. |
asChild | boolean | — | Render as the child element via Slot. |