components

Tailwind CSS Alert

Alerts are designed to notify users about important events, updates, or changes that require their attention.

Class Name
Type
Description
alertComponentContainer element
alert-softStyleSoft color alert with border
alert-outlineStyleAlert with border
alert-primaryColorAlert with ‘primary’ color
alert-secondaryColorAlert with ‘secondary’ color
alert-infoColorAlert with ‘info’ color
alert-successColorAlert with ‘success’ color
alert-warningColorAlert with ‘warning’ color
alert-errorColorAlert with ’error’ color

The standard format of solid-colored avatars, accompanied by the component class alert and modifier class
alert-{semantic-color}.

The standard format of soft-colored avatars, accompanied by the component class alert , alert-soft and modifier class alert-{semantic-color}.

The standard format of outline-colored avatars, accompanied by the component class alert , alert-outline and modifier class alert-{semantic-color}.

You can achieve this style by combining the border-dashed utility class with the alert-outline modifier class.

Add a descriptive icon to complement the message within the alert component, as illustrated in the example below.

Alerts may include supplementary HTML elements such as headers, paragraphs, and icons.

Similarly you can use lists.

The action alert delivers vital information to users and encourages them to take defined actions. It commonly comprises a message, a link for additional details, and interactive buttons for user engagement.

This alert example maintains a horizontal layout on larger screens while adapting to a vertical layout on mobile devices.

Required FlyonUI JS

Utilize the data-remove-element attribute to specify the connected ID for alert removal. Customize the removal animation by incorporating the removing: modifier, as illustrated below.