Alerts

Alerts provide contextual feedback messages for typical user actions, such as success, error, or warning notifications.

Props

PropTypeDefaultDescription
variant'info' | 'success' | 'warning' | 'error''info'The visual style of the alert.
titlestring-An optional bolded title for the alert.
childrenReactNode-The main content or description of the alert.

Variants

Use different variants to match the tone and importance of your message.

Info

<Alert variant="info">This is an informational alert.</Alert>

Success

<Alert variant="success">This is a success alert.</Alert>

Warning

<Alert variant="warning">This is a warning alert.</Alert>

Error

<Alert variant="error">This is an error alert.</Alert>

With Title

<Alert variant="success" title="Order Completed">
  Your order has been successfully processed. You will receive a confirmation email shortly.
</Alert>