Promo code callout in HTML and CSS
A dashed callout highlighting an offer and its code, with the end date.
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>Encart de code promotionnel</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<main class="demo">
<aside class="promo" aria-labelledby="promo-title">
<svg aria-hidden="true" viewBox="0 0 24 24" width="28" height="28" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3.5 12.5 11 5h8v8l-7.5 7.5a1.5 1.5 0 0 1-2 0l-6-6a1.5 1.5 0 0 1 0-2Z"/><circle cx="15.5" cy="8.5" r="1.3"/></svg>:root {
--pr-bg: #fff7ed;
--pr-line: #ea580c;
--pr-text: #2c1404;
--pr-icon: #c2410c;
--pr-code: #ffedd5;
--demo-bg: #ffffff;
--demo-text: #2c1404;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {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

The four classic interface messages: information, success, warning and error.
- 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

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