Skip to Content
DocumentationAlert

Alert

Displays a callout for user attention.

Examples

Regular

Emphasis

Success

Warning

Error

Inline without description

With close button

With actions

With close button and actions

API

Alert

PropertyTypePossible valuesDefaultDescription
variant”regular” | “emphasis” | “success” | “warning” | “error""regular”, “emphasis”, “success”, “warning”, “error""regular”Sets the semantic style for the alert.
onClose() => void--Callback function called when the close button is clicked. Shows close button when provided.
classNamestring--Additional CSS classes for the container.
…propsAll native div props--Allows passing any other standard div properties.

AlertTitle

PropertyTypePossible valuesDefaultDescription
classNamestring--Additional CSS classes for the title.
…propsAll native div props--Allows passing any other standard div properties.

AlertContainer

PropertyTypePossible valuesDefaultDescription
classNamestring--Additional CSS classes for the container.
…propsAll native div props--Allows passing any other standard div properties.

AlertIcon

PropertyTypePossible valuesDefaultDescription
iconReact.ReactNode--The icon to be displayed in the alert.
classNamestring--Additional CSS classes for the icon container.
…propsAll native div props--Allows passing any other standard div properties.

AlertContent

PropertyTypePossible valuesDefaultDescription
classNamestring--Additional CSS classes for the content wrapper.
…propsAll native div props--Allows passing any other standard div properties.
PropertyTypePossible valuesDefaultDescription
classNamestring--Additional CSS classes for the description.
…propsAll native div props--Allows passing any other standard div properties.

AlertActions

PropertyTypePossible valuesDefaultDescription
classNamestring--Additional CSS classes for the actions container.
…propsAll native div props--Allows passing any other standard div properties.

AlertButton

The AlertButton automatically inherits the variant from its parent Alert component, so you don’t need to manually specify the alert variant.

PropertyTypePossible valuesDefaultDescription
variant”regular” | “basic""regular”, “basic""regular”Sets the visual style of the button. Regular has background color, basic is text only with hover effect. Automatically inherits the alert variant from the parent Alert.
classNamestring--Additional CSS classes for the button.
…propsAll native button props--Allows passing any other standard button properties.
Last updated on