Skip to main content

Radio

Storybook

Go to Story

RadioRoot

const RadioRoot: ForwardRefExoticComponent<RadioGroupProps & RefAttributes<HTMLDivElement>> = RadioGroupPrimitive.Root;

Defined in: src/components/Radio/Radio.tsx:18

State provider for the radio. Radio cannot be rendered without a parent.

Use RadioGroup for a complete radio selection list component.


Radio()

function Radio(__namedParameters): Element;

Defined in: src/components/Radio/Radio.tsx:45

Radio component, it implements just the Radio control input. It must be wrapped in a RadioGroup.Root.

Use RadioGroup for a complete radio selection list component.

Parameters

ParameterType
__namedParametersRadioGroupItemProps & RefAttributes<HTMLButtonElement>

Returns

Element

Examples

<RadioRoot
onValueChange={(value) => console.log(value)}
defaultValue="unread"
>
<Radio value="unread" />
</RadioRoot>
// typically wrapped with SideLabel for proper labeling
<SideLabel label="Unread">
<Radio value="unread" />
</SideLabel>