Binhlaig UI Component

Alert

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

Installation

Initialize Binhlaig UI once, then install Alert with the saved installer.

Initialize first

npx binhlaig-ui@latest init
Terminal
npx binhlaig-ui@latest add alert

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.

Update or Overwrite

Replace an older Alert source with the latest registry version.

npx binhlaig-ui@latest add alert --overwrite

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