Alert

Contextual feedback messages for user actions and system states.

Changes saved

Your profile settings have been updated successfully.

Installation

1 pnpm dlx mono add alert

Usage

1import { Alert } from "@/components/ui/alert"
<Alert
  tone="success"
  icon={<IconCheckmark />}
  title="Deployment successful"
  description="Your changes are now live on production."
/>

Examples

With Icon

Alert with a leading icon for added context.

Keyboard shortcut updated

Command + K now opens the quick search.

Information

Informational alert with a blue accent tone.

New version available

Mono DS 1.2 includes new components and bug fixes.

Success

Confirms that an action completed successfully.

Deployment successful

Your changes are now live on production.

Warning

Warns the user about an approaching issue.

Approaching usage limit

You have used 90% of your monthly API quota.

Error

Signals a failed action or error state.

Payment failed

We could not process your card. Please update your billing details.

With Close Button

Dismissible alert the user can close manually.

Tip of the day

Press Cmd+Shift+P to open the command palette.

Title Only

Compact alert without a description.

All systems operational

With List

Alert listing multiple related issues.

Form submission failed
  • Email address is required
  • Password must be at least 8 characters
  • You must accept the terms of service

With Action

Alert with primary and secondary action buttons.

Update available

A new version of the CLI is ready to install.

Anatomy

  • Alert - Root container with tone-based styling
  • Icon - Optional leading icon matching the tone
  • Title - Primary message, always visible
  • Description - Optional supporting text
  • Actions - Optional buttons for user response

Props

Alert

Prop Type Default
tone'default' | 'info' | 'success' | 'warning' | 'error''default'
titlestringrequired
descriptionstringundefined
iconReactNodeundefined
liststring[]undefined
closablebooleanfalse
actionsbooleanfalse