Four-level alerts in HTML and CSS
The four classic interface messages: information, success, warning and error.
Here is an excerpt of this component's code in HTML and CSS. The full code is free for members, ready to copy into your project.
This component also comes in
The code in HTML and CSS
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Alertes à quatre niveaux</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<main class="demo">
<div class="levels">
<div class="levels__item levels__item--info">:root {
--lv-info-bg: #eff6ff;
--lv-info-line: #bfdbfe;
--lv-info: #1e40af;
--lv-ok-bg: #f0fdf4;
--lv-ok-line: #bbf7d0;
--lv-ok: #166534;
--lv-warn-bg: #fffbeb;
--lv-warn-line: #fde68a;
--lv-warn: #92400e;
--lv-err-bg: #fef2f2;
--lv-err-line: #fecaca;Free component: copy it freely, including for commercial projects.
Other toasts and alerts components in HTML and CSS
Toasts and alerts components in HTML and CSS
A banner that warns visitors when they lose the network and announces when it is back, using browser events, with no request.
- Tailwind
- React
- CSS
- WordPress

A bell with an unread badge that opens a notification panel: icons by type, read and unread items told apart, and a "Mark all as read" button.
- Tailwind
- React
- CSS
- WordPress

Three callouts for technical documentation: note, tip and warning.
- Tailwind
- React
- CSS
- WordPress

A notice warning of a scheduled service interruption, with date, time and impact.
- Tailwind
- React
- CSS
- WordPress

A dashed callout highlighting an offer and its code, with the end date.
- Tailwind
- React
- CSS
- WordPress

An announcement bar at the top of the page with a link and a button to close it.
- Tailwind
- React
- CSS
- WordPress