Shadix

Alert

Displays a callout for user attention, with default and destructive variants.

<.alert><.alert_title>Heads up!</.alert_title><.alert_description>You can add components to your app using the CLI.</.alert_description></.alert>

Examples

Variants

Default and destructive variants.

<div class="flex flex-col gap-4 max-w-md">
  <.alert variant="default">
    <.alert_title>Heads up!</.alert_title>
    <.alert_description>You can add components to your app using the CLI.</.alert_description>
  </.alert>
  <.alert variant="destructive">
    <.alert_title>Something went wrong</.alert_title>
    <.alert_description>Your session has expired. Please log in again.</.alert_description>
  </.alert>
</div>

Props

Name Type Default Values
class :string
rest :global
variant :string "default" default | destructive
inner_block (slot) :slot