Skip to main content
  1. Docs
  2. Components
  3. Feedback

Alert

A message in the page: above a form, in a card, or across the top as a banner. It never takes focus, and never goes by itself.

Import
@qeetrix/react/experimental
Status
ExperimentalSince 0.0.4
Renders
<div>Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

Playground

Every prop, live, and the code it takes.

Warning: Directory sync is behind
Users added in the last hour may be missing.
Tone
Variant
sync-status.tsx
import { Alert } from "@qeetrix/react/experimental";

<Alert
  title="Directory sync is behind"
  tone="warning"
>
  Users added in the last hour may be missing.
</Alert>

02

Tones

The icon and a hidden word carry the tone ("Warning:"), never colour alone.

Information: You're in Development
Sign-ins here don't reach production.
Success: Directory synced
1,284 users are up to date.
Warning: Directory sync is behind
Users added in the last hour may be missing.
Error: Directory sync failed
Azure AD rejected the client secret.

03

With actions

actions under the text: one primary at most.

Error: Directory sync failed
The last three attempts timed out.

04

Dismiss

onDismiss adds a Dismiss button. You decide whether the alert comes back.

Success: Directory synced
1,284 users are up to date.

05

Your own icon

icon, in place of the tone's: an eye for viewing as someone else.

Warning: You're viewing as Priya Sharma
Anything you change is done as her.
Information: The signing key rotates in 7 days

06

Page banner

variant="banner": a notice about the whole app, one line across the page, its actions at the end. In AppShell's banners.

Warning: You're viewing as Priya Sharma
(priya@acme.in). Anything you change is done as her.
Information: Maintenance on Sunday 2 November, 01:00–02:00 IST.
Sign-in keeps working.

07

After something happens

announce: "urgent" interrupts (role="alert") for an error that blocks the task; "polite" waits its turn. Only for an alert that appears.

08

In Hindi

QeetrixProvider's messages: the hidden tone word and Dismiss.

चेतावनी: डायरेक्टरी सिंक पीछे है
पिछले एक घंटे में जोड़े गए उपयोगकर्ता शायद नहीं दिखें।
Next — AlertUsage