Sourceful Energy

Alert

Displays a callout for user attention with contextual feedback.

Installation

import { Alert, AlertTitle, AlertDescription } from "@sourceful-energy/ui"

Usage

Examples

With Icon

Destructive

Success

Warning

Info

Energy

Props

PropTypeDefaultDescription
variant"default" | "destructive" | "success" | "warning" | "info" | "energy""default"The visual style of the alert.
classNamestring-Additional CSS classes.

Accessibility

  • Uses role="alert" for screen readers
  • Icons should have appropriate aria-labels
  • Color is not the only indicator of variant type
  • Text content provides context for all users