npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-alert.json --yesAlert
ProA message about the state of something that stays inline in the page until it changes, for React and Tailwind CSS. Part of Goop Pro.
What an agent sees
- AlertIconThe kind's pack icon in its 16 px box at the start of the row, centred on the title's 18 px line
- AlertTitleThe alert's few words
- AlertDescriptionThe message under the title
- AlertActionThe caller's action at the end of the row (the theme's small
Button, or itsLink)
import { Alert, AlertAction, AlertDescription, AlertIcon, AlertTitle } from '@/components/ui/goop/alert';
import { Button } from '@/components/ui/goop/button';
function SyncPaused({ onRetry }: { onRetry: () => void }) {
return (
<Alert variant="warning">
<AlertIcon />
<AlertTitle>Sync paused</AlertTitle>
<AlertDescription>Changes are kept on this device until the connection is back.</AlertDescription>
<AlertAction>
<Button size="sm" onClick={onRetry}>
Retry
</Button>
</AlertAction>
</Alert>
);
}Switch the kind (its icon and colour follow), retitle it, make its description long or take it away (the title alone), take its action away; the Retry action counts its presses. Retry reaches nothing: it only counts.
When to use
- A message about the state of something that stays inline in the page until it changes.
- Also called: callout or notice.
When not to use
- For a passing notice use Toast.
Installation
Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Alert on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-alert.json --yesAdd the Goop Alert to this project. The install steps are at https://goop.so/docs/install.mdUsage
import { Alert, AlertAction, AlertDescription, AlertIcon, AlertTitle } from '@/components/ui/goop/alert';
import { Button } from '@/components/ui/goop/button';
function SyncPaused({ onRetry }: { onRetry: () => void }) {
return (
<Alert variant="warning">
<AlertIcon />
<AlertTitle>Sync paused</AlertTitle>
<AlertDescription>Changes are kept on this device until the connection is back.</AlertDescription>
<AlertAction>
<Button size="sm" onClick={onRetry}>
Retry
</Button>
</AlertAction>
</Alert>
);
}- Fits: account, states (their recipes).
- In the page, at the top of the section or above the form it concerns: an
AlertIcon(left empty: the kind's own), anAlertTitleof a few words, anAlertDescriptionthat says what to do, and at most oneAlertActionholding the theme'sButton size="sm"or itsLink. A notice about the whole page is theBanner; the result of something the person just did is aToast. - height, gap, text: add no class for these.
API reference
| Option | Type | What it does |
|---|---|---|
| variant | default | info | success | warning | destructive = default |
| Part | What it is |
|---|---|
| AlertIcon | The kind's pack icon in its 16 px box at the start of the row, centred on the title's 18 px line; icon?: IconName — A pack icon name in place of the kind's |
| AlertTitle | The alert's few words |
| AlertDescription | The message under the title |
| AlertAction | The caller's action at the end of the row (the theme's small Button, or its Link) |
- Class recipes (cva): alertVariants (Alert)
- data-slot values (to select a part by): alert, alert-action, alert-content, alert-description, alert-icon, alert-title
Notes for AI
Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.