Radio

A form control that allows users to select a single option from a group of mutually exclusive choices.

Installation

npx chilli@latest add radio

Default

Option 1
Option 2
Option 3

Sizes

States

With Text

Email notificationsReceive updates via email.
SMS notificationsReceive updates via text message.
No notificationsYou won't receive any notifications.

Horizontal

Daily
Weekly
Monthly

API Reference

Radio

PropTypeDefaultDescription
checkedbooleanfalseControlled checked state.
valuestring—The value of the radio when used inside a RadioGroup.
labelstring—The label text displayed next to the radio.
descriptionstring—Description text displayed below the label.
size"sm" | "md""md"The size of the radio.
disabledbooleanfalseWhether the radio is disabled.
onCheckedChange(checked: boolean) => void—Callback when the checked state changes.

RadioGroup

PropTypeDefaultDescription
valuestring—The currently selected value.
onValueChange(value: string) => void—Callback when the selected value changes.
orientation"vertical" | "horizontal""vertical"Layout direction of the radio group.