examples/alert-info.tsx
import { Alert } from "@/components/wensity/alert";export function InfoAlert() {return (<Alertvariant="info"title="Workspace indexing started"description="Search results will update as components are processed."/>);}
A React alert for inline info, success, warning, and error messages, with titles, an action button, a dismiss control, and screen reader roles built in.
Practical examples and common states for the same installable component.
Guidance and background state without warning-level emphasis.
Completion state with confident confirmation.
Attention state for recoverable issues and upcoming risk.
Assertive feedback for failed operations.
Alert is a React and Tailwind CSS alert component, in Next.js or any React app, for inline messages inside a page or form, in neutral, info, success, warning, and error styles with matching icons. Errors and warnings render with role alert so screen readers announce them at once, while the calmer variants use role status. Add a title, a description, or any children, an action slot for a button such as Retry, and onDismiss for a close button with its own label. A compact density fits busy forms. For messages that appear and leave on their own, use Toast instead.
Run the following command
pnpm dlx wensity@latest add alert
npx wensity@latest add alert
yarn dlx wensity@latest add alert
bunx wensity@latest add alert
Import Alert from @/components/wensity/alert and render it anywhere in your React or Next.js app. The source lands in your own repo, so every prop, class and animation below is yours to edit.
import { Alert } from "@/components/wensity/alert";export function AlertDemo() {return (<Alertvariant="success"title="Production deploy completed"description="The new pricing page is live in all regions."/>);}
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "neutral" | "info" | "success" | "warning" | "error" | "info" | Status colour recipe and the default icon that comes with it. |
density | "comfortable" | "compact" | "comfortable" | Padding scale. compact suits inline or stacked alerts. |
title | React.ReactNode | - | Bold heading line. Also settable via the AlertTitle subcomponent. |
description | React.ReactNode | - | Body copy under the title. Also settable via AlertDescription. |
icon | React.ReactNode | - | Overrides the icon the variant supplies. Pass null to drop it. |
action | React.ReactNode | - | Trailing slot for a button or link. |
onDismiss | () => void | - | When set, renders a dismiss button and calls this on press. |
dismissLabel | string | "Dismiss alert" | Accessible label for the dismiss button. |
React toast notifications on Base UI in info, success, warning, error, and action styles, with swipe to dismiss, six positions, and a hook to fire them.
A React empty state for blank dashboards, no results screens, and errors, with an icon, title, description, action buttons, and a footer slot.
A React modal dialog on Base UI with default, confirmation, form, fullscreen, and scrollable layouts, focus trapping, and a ready made confirm flow.
A React field for form validation messages, linking a label, help text, and an error or success line to the input, in stacked or side by side layout.

A pixel-faithful Apple Dynamic Island that morphs, splits, and breathes while it hosts live activities inside your app.

A soft Apple Intelligence edge glow that traces the screen with a rotating iridescent gradient you can toggle on.

Glowing border CSS for cards: a cursor glowing effect, or beams, spins and pulses.

Hand-rolled canvas particles with gravity, drag, terminal velocity, and paper ribbons that flutter on the way down.