Back to Supabase

Alert

apps/design-system/content/docs/components/alert.mdx

1.26.04694 B
Original Source

Alert forms the core primitives for Admonition. Use the Admonition component unless you must deviate from our consistent patterns. Examples where Alert might make sense include:

  • Bespoke icon requirement
  • Highly custom internal contents
<ComponentPreview name="alert-demo" peekCode wide />

Installation

bash
npx shadcn-ui@latest add alert

Usage

tsx
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert'
tsx
<Alert>
  <Terminal className="h-4 w-4" />
  <AlertTitle>Heads up!</AlertTitle>
  <AlertDescription>
    You can add components and dependencies to your app using the cli.
  </AlertDescription>
</Alert>