Getting Started
Foundations
Components
Search for a command to run...
Alerts are used to display contextual feedback messages for typical user actions, such as success confirmations, warnings, errors, or informational notices. They draw attention to important information without requiring user interaction, though they can be dismissible when appropriate. Alerts support different visual styles (variants) to convey the urgency and nature of the message, helping users quickly understand the severity and context of the information being presented.
Use alerts to provide feedback about the outcome of an action, warn users about potential issues, or highlight important information that requires attention. Alerts should be concise and actionable when possible, giving users clear next steps if applicable. Avoid using too many alerts on a single page as this can reduce their effectiveness and overwhelm users.
import { Alert } from "@strongtie/design-system/alert"This module exports the following components:
AlertAlertDescriptionAlertTitle<Alert>| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "destructive" | null | - |
Components can be styled using the className prop. The design system uses Tailwind CSS for styling.
CSS classes used by this component:
alertalert-descriptionalert-titleEnsure proper accessibility attributes are added when implementing this component.