Skip to Content
Liquid Glass UI
Components

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: AlertAction aligns vertically centered on the right, ideal for Button size="xs".
  • Default Liquid Glass: Renders as a Liquid Glass panel reacting to the global glass tint (destructive layers a subtle red tint on top); pass glass={false} for a 100% opaque surface.
apple-liquid-ui/preview/alert-demo
MacBook · 16:10

Installation (Shadcn Registry)

npx shadcn@latest add @apple-liquid/alert

Usage

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

PropTypeDefaultDescription
glassbooleantrueLiquid 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-detectedManually override the hosting surface context

On this page