Alert
Apple 27 inline alert banner with grouped surface, 0.5px hairline stroke, accent icon, 18px mobile ↔ 12px desktop corner radius, and an Apple Red tinted destructive variant.
Fully compatible with the standard shadcn/ui JSX API (Alert / AlertTitle / AlertDescription / AlertAction, preserving default and destructive variants):
- Icon: Styled with the active theme accent color.
- Destructive variant: Uses an Apple Red tinted surface and red text.
- Action slot:
AlertActionaligns vertically centered on the right, ideal forButton size="xs". - Default Liquid Glass: Renders as a Liquid Glass panel reacting to the global glass tint (
destructivelayers a subtle red tint on top); passglass={false}for a 100% opaque surface.
Installation (Shadcn Registry)
npx shadcn@latest add @apple-liquid/alertUsage
import { InfoIcon } from 'lucide-react';
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';
export function Example() {
return (
<Alert>
<InfoIcon />
<AlertTitle>Software Update Available</AlertTitle>
<AlertDescription>Includes security improvements and bug fixes.</AlertDescription>
</Alert>
);
}Props API
| Prop | Type | Default | Description |
|---|---|---|---|
glass | boolean | true | Liquid Glass material reacting to glass tint; false renders a 100% opaque surface. Automatically switches to Over-Glass when nested on a glass surface |
surface | 'default' | 'over-glass' | Auto-detected | Manually override the hosting surface context |
Accordion
Apple 27 expandable list with hairline row dividers, a trailing chevron that rotates 90° when open, and spring height animation. Adapts between 44px mobile touch rows and 32px desktop rows, and becomes an Inset Grouped section inside a glass Card.
AlertDialog
Responsive Apple Liquid Glass alert dialog reproducing macOS 27's compact 26px-radius alert with pill buttons on desktop, and automatically adapting to iOS 27's 34px-radius centered Liquid Glass alert with 48px capsule buttons on mobile.