mirror of
https://github.com/supabase/supabase.git
synced 2026-10-11 20:35:07 +03:00
* finesse optical alignment * improvements * actions styling * improvements * margins * improvements * fix docs * fix * improve schema warning admonition * misc fixes * tweaks * docs and improvements * alphabetical sidebar navigation * remove alert-error * fix build error * Tiny fixes * tiny docs update * semantic description * handle intro pages * note NoPermission component * docs sidebar ordering --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
38 lines
822 B
Plaintext
38 lines
822 B
Plaintext
---
|
|
title: Alert
|
|
description: Displays a callout for user attention.
|
|
component: true
|
|
source:
|
|
radix: true
|
|
shadcn: true
|
|
---
|
|
|
|
Alert forms the core primitives for [Admonition](../fragments/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>
|
|
```
|