CSS Live Badge
A "Live" status pill with a pulsing dot, made with a single element.
Live
HTML
<span class="badge-live">Live</span>
CSS
.badge-live {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 7px 14px 7px 12px;
border-radius: 999px;
background: #fef2f2;
color: #dc2626;
font: 700 13px/1 system-ui, sans-serif;
letter-spacing: 0.06em;
text-transform: uppercase;
}
.badge-live::before {
content: "";
width: 8px;
height: 8px;
border-radius: 50%;
background: currentColor;
animation: live-pulse 1.4s ease-out infinite;
}
@keyframes live-pulse {
0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6); }
100% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}
@media (prefers-reduced-motion: reduce) {
.badge-live::before {
animation: none;
}
}
About this CSS Live Badge
This CSS Live Badge is 32 lines of pure CSS (0.6 KB) with no JavaScript and no dependencies. It uses keyframe animations, box shadows, Flexbox and reduced-motion support. It works in current versions of Chrome, Edge, Safari and Firefox. It works in any stack: plain HTML, React, Vue, Svelte, Astro, WordPress or Webflow.
CSS features used
Customize it
The colors in this snippet. Search and replace them to match your brand:
#fef2f2#dc2626
How to use this live badge
- Copy the HTML and paste it where you want the element to appear.
- Copy the CSS into your stylesheet, or inside a
<style>tag. - Keep the
.badge-liveclass name, or rename it in both places. Then tweak colors, sizes and timing to match your design. - Using React or Next.js? Change
classtoclassNamein the HTML. The CSS works as is, including in Tailwind projects (put it in your global stylesheet).
Building with an AI tool?
“Copy for AI” copies a short prompt for Cursor, Claude Code, Lovable, Bolt or v0. Your AI tool opens the Markdown version of this snippet and reads the HTML, CSS and setup notes there. If your tool can't open links, with the code instead. More ways to use copy CSS with AI.