Alerts

Ready to use Tailwind CSS alert components with production-ready, copy-paste HTML code. Use them as they are, or as a starting point to build beautiful websites.

Alerts are for telling someone something important, a success confirmation, a warning before they do something risky, an error that needs attention, or just a bit of info. We have a few layouts: simple colored banner, icon on the left, dismissible with an X, and an outlined version. They come in the usual four flavors, success, warning, error, info. Clean, readable, and easy to drop anywhere in a layout.

Tailwind

Frequently asked questions

Success, warning, error, and info. Each style is available in a solid/filled version, a soft background version, and some with an icon or dismiss button.

The dismiss variants have an X button already in the markup. Just add a small click handler in JavaScript to remove the element, something like button.closest('[role="alert"]').remove().

Yes. A few of the variants already have a "Learn more" style link. Just drop an anchor tag inside the message text with whatever styling you want.

Not exactly, alerts are inline in the page layout, toasts appear floating at the edge of the screen. Check the notifications section for those.

Related Tailwind CSS components

More free, copy-paste Tailwind CSS components to use in your projects.