Feedback

Alerts for status and system messages

Show inline status, validation summaries, and operational notices with a composable Alert component. Works in React 19 projects and Next.js route segments that need lightweight feedback without modal chrome.

Examples

Compare semantic tones and motion with the code tab.


Alert variants examples

Each row pairs live output with matching JSX; the Variant line states which appearance/size tokens apply.



























What it does

Alerts are inline by design: combine title and description slots for scanning.

Motion presets help draw attention without hijacking focus from inputs.

Composition and API

Prefer compound subcomponents instead of one oversized prop bag. Export a small, documented API for your design system.

Keep roles truthful—do not mark purely decorative banners as assertive live regions unless they truly interrupt workflow.

Common use cases

  • Summarize form errors above a Next.js server action form.
  • Surface deployment or maintenance banners on dashboard shells.
  • Highlight irreversible actions with a persistent warning tone.
  • Provide neutral guidance next to dense configuration tables.

Accessibility

Keyboard order, focus rings, and ARIA attributes should match production usage. Test with your supported browsers and assistive technologies when semantics are non-trivial.

This preview page exposes a single h1 in the hero for a clean outline.

Next.js integration notes

Colocate examples under the App Router, keep server and client boundaries explicit, and avoid pulling interactive overlays into unexpected server layouts.

Set NEXT_PUBLIC_SITE_URL so canonical and Open Graph URLs resolve on deploy.

FAQ

Does the Alert component work with Next.js App Router?

Yes. Import it like any other React component; keep interactive subtrees in client components when you need hooks or browser APIs, and leave static structure in server components where possible.

Can I customize alert with Tailwind CSS?

Zentauri UI exposes class-friendly variants and slots so you can extend styles with Tailwind utilities without fighting inline styles.

Is this Alert implementation accessible by default?

Primitives follow sensible defaults, but accessibility depends on how you label controls, manage focus, and wire keyboard handlers in your app. Validate critical flows with keyboard-only use and screen readers.