Skip to content

Alert

A callout for displaying important information.

Installation

pnpm dlx shadcn@latest add @frontal-labs/alert

Usage

import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
<Alert>
  <AlertTitle>Heads up!</AlertTitle>
  <AlertDescription>
    You can add components and dependencies to your app using the cli.
  </AlertDescription>
</Alert>

API Reference

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

Alert

Root container for the alert.

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

With Icon

With Icon and Action Buttons

Info Alert

Success Alert

Warning Alert

Error Alert