Alert

An alert displays a short, important message in a way that attracts the user's attention without interrupting the user's task.

Alert Types

Five alert types for different contexts: success, warning, error, info, and default.

Without Close Button

Alerts without a close button for persistent informational messages.

With Second Message

Add a secondary message below the primary message for additional context (center aligned).

interface AlertProps {
  open?: boolean;
  type: 'success' | 'warning' | 'error' | 'info' | 'default';
  message: string;
  secondMessage?: string; // Secondary text for additional context (center aligned)
  onClose: () => void;
  showCloseButton?: boolean; // default: false (auto-dismiss after 5s), true = dismissable
}