Reactolith UI Getting Started Introduction Installation Usage Layout Aspect Ratio Card Resizable Scroll Area Separator Direction Provider Forms Button Button Group Calendar Checkbox Combobox Field Input Input Group Input OTP Label Native Select Radio Group Select Slider Switch Textarea Toggle Toggle Group Data Display Accordion Avatar Badge Carousel Chart Collapsible Item Kbd Table Feedback Alert Empty Progress Skeleton Sonner Spinner Overlay Alert Dialog Context Menu Dialog Dropdown Menu Hover Card Popover Sheet Tooltip Navigation Breadcrumb Command Menubar Navigation Menu Pagination Sidebar Tabs

Alert

Displays a callout for important information, warnings, or error messages.

Preview

Heads up! You can add components to your app using the CLI. Error Your session has expired. Please log in again.

Usage

<div class="space-y-3">
  <ui-alert>
    <ui-alert-title>Heads up!</ui-alert-title>
    <ui-alert-description>You can add components to your app using the CLI.</ui-alert-description>
  </ui-alert>
  <ui-alert variant="destructive">
    <ui-alert-title>Error</ui-alert-title>
    <ui-alert-description>Your session has expired. Please log in again.</ui-alert-description>
  </ui-alert>
</div>

Sub-components

<ui-alert> <ui-alert-title> <ui-alert-description> <ui-alert-action>

Props

<ui-alert>

PropTypeDefaultDescription
variant"default" | "destructive""default"The visual style variant.

All components also accept standard HTML attributes (class, id, style, data-*, aria-*, etc.) which are passed through to the underlying element.