Skip to content

Alert

Displays a prominent message box for important notices, warnings, or success messages to keep users informed without interrupting their work.

3.6 KB
•
Updated on August 21, 2026

Installation

Bash

Usage

Code
Code

Features

Variants

All available alert variants in one overview: default, info, warning, error, success.

Badge Icon

Alert variants rendered with a badge container for the icon.

With Actions

Alert with interactive dismiss and action buttons.

API Reference

This is a custom component, not a Base UI wrapper.

Alert

Root container for the alert.

AlertIcon

Container for the alert icon. Supports standalone icon rendering or badge container styling.

AlertTitle

Title text for the alert. Renders as a styled div.

AlertDescription

Description text for the alert. Renders as a styled div with muted foreground color.

AlertAction

Container for action buttons. Automatically positions to the right on larger screens.

Examples

Compact stroke alerts with action buttons