Alert

Aria
RTL

A way of informing the user of important changes in a prominent way.

Alert

Anatomy

<Alert>
  <Alert.Title>...</Alert.Title>
  <Alert.Message>...</Alert.Message>
  <Alert.Close />
</Alert>

Default

With title

With icon

With close

With icon and close

Handle close

Customization

Alert props
Name Type Required Default Description
id string No - Id attribute for DOM element
class css_class No - Tailwind classes for customization
testid string No - Data-testid attribute for DOM element
default slot No - Defult content of Alert item
title slot No - Title of Alert item, see Alert.Title
message slot No - Message of Alert item, see Alert.Message
close slot No - Close button slot of Alert item, see Alert.Close
Alert.Title props
Name Type Required Default Description
id string No - Id attribute for DOM element
class css_class No - Tailwind classes for customization
testid string No - Data-testid attribute for DOM element
default slot No - Title of Alert item
Alert.Message props
Name Type Required Default Description
id string No - Id attribute for DOM element
class css_class No - Tailwind classes for customization
testid string No - Data-testid attribute for DOM element
default slot No - Message of Alert item
Alert.Close props
Name Type Required Default Description
id string No - Id attribute for DOM element
class css_class No - Tailwind classes for customization
testid string No - Data-testid attribute for DOM element
on_click event No - Event to happen when close button is clicked