Primitive

Alert

Displays a callout for user attention with different severity levels.

Installation

npx benflux-ui add alert

Usage

import { Alert, AlertTitle, AlertDescription } from "@benflux-ui/react"

<Alert variant="success">
  <AlertTitle>Saved!</AlertTitle>
  <AlertDescription>Your profile has been updated.</AlertDescription>
</Alert>

Props

PropTypeDefaultDescription
variant"default" | "info" | "success" | "warning" | "destructive""default"Severity level of the alert
dismissiblebooleanfalseShows a close button to dismiss the alert