Alert
alertAn inline message in four states, with a matching icon, an optional title and room for an action. Only the destructive state interrupts a screen reader; the rest wait their turn.
import { Button } from "@/components/forme/button/button";
import { Alert } from "@/components/forme/alert/alert";
export function AlertDemo() {
return (
<div className="flex w-full max-w-xl flex-col gap-3">
<Alert title="A new version of the registry is available">
Run the install command again to pull the latest source into your project.
</Alert>
<Alert variant="success" title="Domain verified">
forme.dev is live. Certificates renew automatically.
</Alert>
<Alert
variant="warning"
title="You are at 92% of your seat limit"
action={
<Button size="small" variant="secondary">
Add seats
</Button>
}
>
New invitations will queue once the workspace is full.
</Alert>
<Alert variant="destructive" title="Payment failed">
The card ending 4242 was declined. Update it to keep your plan.
</Alert>
</div>
);
}Install
Adds the component, its registry dependencies, and the token stylesheet you import once.
API reference
Read from the source, so it is the API of the file you install. A prop marked * is required.
Alert
An inline message about the page or a part of it.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'info' | 'success' | 'warning' | 'destructive' | "info" | |
title | ReactNode | — | |
icon | ReactNode | — | An icon element. Defaults to a glyph that matches the variant. |
action | ReactNode | — | Buttons or links, placed on the right on wide screens and below on narrow ones. |
Also takes every prop of <div> attributes.
Related


Empty State
What a list, table or page shows before it has anything in it: a stacked icon, a title, one sentence and the next action. So an empty screen reads as a start rather than an error.
feedback

Loader
Eight loading indicators — ring, dots, bars, a dot-grid wave and orbit, a terminal braille spinner, a figure-eight comet and sparkles. Pure CSS in a server component, sized in em and coloured by currentColor, with a still frame under reduced motion.
feedback

Progress
A determinate progress bar with its label and value, both announced to a screen reader by the Base UI parts rather than by hand-written aria attributes. A null value renders as indeterminate and dims the track so it reads as waiting.
feedback