Binhlaig logoBinhlaig UI
Binhlaig UI Component

Alert

A clear message block for status updates, notices, warnings and errors.

Installation

Install Alert in your project.

Terminal
npx binhlaig-ui@latest add alert

For project setup, installer selection, dependencies, and advanced installation instructions, see the Installation Guide.

View Installation Guide →Update or Overwrite →

Import

Import Alert primitives from your UI directory.

import {
  Alert,
  AlertActions,
  AlertDescription,
  AlertTitle,
} from "@/components/ui/alert"

Usage

Use AlertTitle and AlertDescription to structure a message.

Variants

Choose a semantic style that matches the message.

With Icon

Place an icon before the title for faster visual recognition.

With Actions

Add relevant actions without turning the alert into a modal.

API Reference

Main components and variants available in Binhlaig UI Alert.

ComponentPurpose
AlertThe semantic message container.
AlertTitleA concise message heading.
AlertDescriptionSupporting message content.
AlertActionsOptional related actions.
PropValuesDefault
variantdefault, info, success, warning, destructivedefault
roleAny valid ARIA rolealert