Strongtie Design System
Getting StartedComponents

Command Palette

Search for a command to run...

Getting Started
  • Introduction
  • Setup Guide
  • Package Installation
  • Code Quality Setup
  • Migration Guide
  • Resources
Registry
  • Getting Started
  • Combobox
  • Datepicker
  • MultiSelect
  • Tree
Guides
  • Framework Recommendations
Foundations
  • States
  • Variables
Components
  • Accordion
  • Alert
  • Alert Dialog
  • Avatar
  • Badge
  • Breadcrumb
  • Button
  • Button Group
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Collapsible
  • Command
  • Combobox
  • Context Menu
  • Date Picker
  • Dialog
  • Drawer
  • Dropdown Menu
  • Empty
  • Field
  • Hover Card
  • Input
  • Input Group
  • Item
  • Kbd
  • Label
  • Menubar
  • Multi Select
  • Navigation Menu
  • Pagination
  • Popover
  • Progress
  • Radio Group
  • Scroll Area
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Skeleton
  • Slider
  • Switch
  • Table
  • Tabs
  • Textarea
  • Toaster
  • Toggle
  • Toggle Group
  • Tooltip
  • Tree
2026 Simpson Strong-Tie
  1. Docs
  2. Components
  3. Alert

Alert

PreviousNext

Alert is a prominent message component that communicates important information to users.

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.

Example

Heads up!
You can add components to your app using the cli.
"use client"

import {
  Alert,
  AlertDescription,
  AlertTitle,
} from "@strongtie/design-system/alert"
import { MdNotificationsNone } from "react-icons/md"

export function AlertDefault() {
  return (
    <Alert>
      <MdNotificationsNone />
      <AlertTitle>Heads up!</AlertTitle>
      <AlertDescription>
        You can add components to your app using the cli.
      </AlertDescription>
    </Alert>
  )
}

Installation

npm install @strongtie/design-system
import { Alert } from "@strongtie/design-system/alert"

Components

This module exports the following components:

  • Alert
  • AlertDescription
  • AlertTitle

Props

<Alert>

PropTypeDefaultDescription
variant"default" | "destructive" | null-

Examples

Heads up!
You can add components to your app using the cli.
"use client"

import {
  Alert,
  AlertDescription,
  AlertTitle,
} from "@strongtie/design-system/alert"
import { MdNotificationsNone } from "react-icons/md"

export function AlertDefault() {
  return (
    <Alert>
      <MdNotificationsNone />
      <AlertTitle>Heads up!</AlertTitle>
      <AlertDescription>
        You can add components to your app using the cli.
      </AlertDescription>
    </Alert>
  )
}

Destructive

Error
Your session has expired. Please log in again.
"use client"

import {
  Alert,
  AlertDescription,
  AlertTitle,
} from "@strongtie/design-system/alert"
import { MdErrorOutline } from "react-icons/md"

export function AlertDestructive() {
  return (
    <Alert variant="destructive">
      <MdErrorOutline />
      <AlertTitle>Error</AlertTitle>
      <AlertDescription>
        Your session has expired. Please log in again.
      </AlertDescription>
    </Alert>
  )
}

Styling

Components can be styled using the className prop. The design system uses Tailwind CSS for styling.

Classes

CSS classes used by this component:

  • alert
  • alert-description
  • alert-title

Accessibility

Ensure proper accessibility attributes are added when implementing this component.

Alert DialogAvatar

On This Page

ExampleInstallationComponentsProps<Alert>ExamplesDestructiveStylingClassesAccessibility

Contribute

  • Report an issue
  • Request a feature
  • Edit this page