RadioGroup
Responsive Apple Liquid Glass radio group adapting between 22px mobile touch rings and 16px macOS 27 precision radio buttons, with group-level size/glass inheritance and spring inner dots.
Fully compatible with the standard shadcn/ui JSX API (<RadioGroup> / <RadioGroupItem>), adapting automatically via CSS viewport breakpoints (md: / 768px):
- Desktop (
>= 768px· macOS 27): Aligned with macOS 27 UI Kit3 Rg, featuring a16×16circular ring with a6pxglossy white inner dot and Apple Blue sheen. - Mobile (
< 768px· iOS 27): Expands to a22×22circular touch target with enlarged hit area for effortless one-handed selection. - Group-level inheritance: Set
size,glass, ordisableMotiononce on<RadioGroup>to cascade across all<RadioGroupItem>children, with optional per-item overrides.
Responsive Live Preview
Switch AirDrop visibility inside a Liquid Glass panel; toggle Desktop / Mobile in the top-right to compare sizing:
Installation (Shadcn Registry)
npx shadcn@latest add @apple-liquid/radio-groupSize Scale & Disabled States
Includes sm, default, and lg responsive sizes and disabled state previews:
Usage
import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group';
export function Example() {
return (
<RadioGroup defaultValue="contacts">
<label className="flex items-center gap-2.5">
<RadioGroupItem value="contacts" />
<span className="text-sm">Contacts Only</span>
</label>
<label className="flex items-center gap-2.5">
<RadioGroupItem value="everyone" />
<span className="text-sm">Everyone</span>
</label>
</RadioGroup>
);
}Props API
RadioGroup
| Prop | Type | Default | Description |
|---|---|---|---|
size | 'sm' | 'default' | 'lg' | 'default' | Default size propagated to items (mobile 18/22/26px ↔ desktop 14/16/20px) |
glass | boolean | true | Liquid Glass toggle propagated to items; false renders 100% opaque Bordered fill |
disableMotion | boolean | false | Disable spring scale animation on the selected inner dot |
RadioGroupItem
| Prop | Type | Default | Description |
|---|---|---|---|
size | 'sm' | 'default' | 'lg' | Inherited from RadioGroup | Override size for this item |
glass | boolean | Inherited from RadioGroup | Override glass material for this item |
disableMotion | boolean | Inherited from RadioGroup | Override motion toggle for this item |
Questionnaire
One-question-at-a-time stepped survey with Apple-styled single/multi-select option cards, keyboard letter/number shortcuts, Liquid Glass text inputs, and Previous / Skip / Next navigation.
Resizable
macOS 27 Split View-style resizable panes featuring 1px system dividers that highlight in the accent color on hover/drag and optional capsule grip handles.