Zephora UI

Form

Radio

Radio button group. RadioGroup manages the shared name, value and WAI-ARIA keyboard navigation; each Radio renders one clickable, labelled option.

Import

import { Radio, RadioGroup } from "@zephora/react";

Examples

Basic

Horizontal, controlled

Selected: standard

Sizes

API

RadioGroup props

PropTypeDefaultDescription
valuestringControlled selected value.
defaultValuestringInitial selected value (uncontrolled).
onValueChange(value: string) => voidCalled with the newly selected value.
namestringShared radio name; auto-generated when omitted.
orientation"horizontal" | "vertical""vertical"Layout direction (also sets aria-orientation).
disabledbooleanfalseDisables every radio in the group.
unstyledbooleanfalseHeadless mode — drops Zephora classes so your own CSS can style it.
…restHTMLAttributes<HTMLDivElement>Forwarded to the radiogroup element; provide aria-label or aria-labelledby.

Radio props

PropTypeDefaultDescription
value *stringThe value this radio represents inside its group.
size"sm" | "md" | "lg""md"Control size.
childrenReactNodeLabel content; the label wraps the input so it is clickable.
unstyledbooleanfalseHeadless mode — drops Zephora classes so your own CSS can style it.
…restInputHTMLAttributes<HTMLInputElement>Remaining native input props are forwarded (name, checked and value are managed).

Keyboard

KeyAction
Arrow Down / Arrow RightSelects and focuses the next radio (wraps).
Arrow Up / Arrow LeftSelects and focuses the previous radio (wraps).
SpaceSelects the focused radio.
TabMoves focus into / out of the group.