Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Alert

Static inline messaging, extracted from the mockup’s .alert (warning tone) and .banner (info tone). The background carries the tone, the body text stays --ink, and the lead-in takes the tone colour.

React Alertlive
import { Alert } from "@/components/ui/alert";
export function Notifications() {
return (
<div className="flex flex-col gap-3">
<Alert variant="info" title="Info">Your changes take effect immediately.</Alert>
<Alert variant="warning" title="Attention">Two groups have no owner.</Alert>
<Alert variant="danger" title="Failed">System update unavailable.</Alert>
</div>
);
}
Terminal window
npx @glaceon/cli add alert --framework react # or svelte, solid
Variant Background Lead-in Source in the mockup
info --info-bg --info .banner
warning --warning-bg --warning .alert
success --success-bg --success Added, same pattern
danger --danger-bg --danger Added, same pattern
Prop Type Default Description
variant "info" | "warning" | "success" | "danger" "info" Selects the tone.
title string undefined Short lead-in, rendered as tone-coloured bold text.
role "status" | "alert" | "none" "status" Accessible role for live region announcements.
class / className string undefined Extra classes, appended last.

The body text is always --ink on a tinted background, never the tone colour on its own tone, so contrast does not depend on which variant is chosen. Only the lead-in uses the tone colour, and it is bold, which carries it past the 3:1 large-text threshold. Colour is never the only signal: the lead-in text states what happened.