Requires Material Tailwind JS

Tailwind CSS Alerts

Create informative and responsive alert messages with our Tailwind CSS alert components. Perfect for displaying important notifications, feedback, or status messages to users without disrupting their workflow.

An alert displays a short and important message attracting the user's attention without interrupting the user's task. Use this element when you need to show highly-important messages to users or when you need a persistent static container that is closable by user actions.

Below we are presenting examples of alerts that you can use in your Tailwind CSS project. The examples come in different colors and styles so you can adapt them easily to your needs.


Alert Demo

Build clean and accessible alerts using Tailwind CSS flexbox and color utilities. This high-contrast design ensures your messages stand out while maintaining readability.


Alert Variants

Style your alerts with different visual treatments using Tailwind CSS gradient utilities. Choose from solid, gradient, or outlined styles to match your design needs.


Alert Colors

Enhance your alerts with Tailwind CSS color utilities. Choose from beautiful preset colors like bg-slate-800, bg-slate-200, bg-blue-500, bg-green-500, bg-red-500, and bg-amber-500 to convey different types of messages effectively.


Alert Icon

Add visual context to your alerts by combining Tailwind CSS flex utilities with custom icons. Icons help users quickly understand the message type and importance.


Alert with List

Create detailed alerts containing multiple items using Tailwind CSS typography and spacing classes. Perfect for displaying multiple related messages or step-by-step instructions.


Alert Dismissible

Build interactive alerts that users can dismiss using Tailwind CSS transitions and transforms. These alerts smoothly animate out of view when users click the close button.


Alert Custom Close Icon

Personalize your dismissible alerts with custom close icons using Tailwind CSS positioning and sizing utilities. Create a unique look while maintaining clear interaction cues.


Alert with Content

Design rich content alerts using Tailwind CSS grid and typography classes. Perfect for displaying detailed messages with titles, descriptions, and additional content.


Alert Custom Styles


Required Script

Add these scripts to the bottom of your HTML:

1<script src="https://unpkg.com/@material-tailwind/[email protected]/dist/material-tailwind.umd.min.js" defer></script>