Alert

Short message set apart from the surrounding text. Pure presentation — it renders a <div> and holds no state.

Scheduled maintenance

The workspace will be read-only on Sunday from 02:00 to 04:00 UTC.

New in this release

You can now invite teammates directly from a project.

Deploy finished

Version 4.2.0 is live for everyone.

Approaching your limit

You've used 9.1 GB of the 10 GB included in this plan.

Props

PropValuesDefaultDescription
variant"default", "accent", "success", "warning", "danger""default"Visual weight of the message.
titlenodeBold first line. Omit it for a single-paragraph alert.
classNamestring""Appended after the component's own classes.

All other <div> attributes are forwarded, including ref.

Common patterns

<Alert title="Scheduled maintenance">
  Read-only on Sunday, 02:00–04:00 UTC.
</Alert>

// No title, just a line of text
<Alert variant="accent">Your trial ends in 5 days.</Alert>

Notes

success and warning read the optional --color-success and --color-warning tokens rather than the core seven. They ship in the theme block, but if you delete either line those variants render with an empty background — Tailwind never generates a utility for a token that doesn't exist, and it fails silently. Keep the token or don't use the variant.

The danger variant sets role="alert", so screen readers announce it when it appears. The others do not, since a message that is simply present on the page should not interrupt.