Pulse animation
Also called pulsing dot, ping animation, or live indicator
A soft, repeating beat or expanding ring that draws the eye to a live status, a new notification, or something that needs attention.
import { motion, useReducedMotion } from 'motion/react';
// One shared rhythm for the ring and the badge beat.
const BEAT = { duration: 1.6, repeat: Infinity };
export function StreamHeader({
title,
unread
}: {
title: string;
unread: number;
}) {
const reduceMotion = useReducedMotion();
return (
<header className='flex items-center justify-between gap-4'>
<h2 className='flex items-center gap-2 font-medium'>
<span className='relative flex size-2'>
{/* A ring grows out of the dot and fades: transform and opacity only. */}
{!reduceMotion && (
<motion.span
aria-hidden
animate={{ scale: [1, 2.5], opacity: [0.5, 0] }}
transition={{ ...BEAT, ease: 'easeOut' }}
className='absolute inset-0 rounded-full bg-emerald-500'
/>
)}
<span className='relative size-2 rounded-full bg-emerald-500' />
</span>
{title}
<span className='text-xs font-normal text-emerald-600'>Live</span>
</h2>
<button
type='button'
className='relative rounded-full border px-3 py-1.5 text-sm'
>
Notifications
{unread > 0 && (
<motion.span
// A quick swell at the start of each beat, then rest.
animate={reduceMotion ? undefined : { scale: [1, 1.15, 1, 1] }}
transition={{ ...BEAT, times: [0, 0.1, 0.25, 1] }}
className='absolute -top-1.5 -right-1.5 grid min-w-5 place-items-center rounded-full bg-red-500 px-1 text-xs font-medium text-white'
>
{unread}
</motion.span>
)}
</button>
</header>
);
}Add a live indicator next to the stream title: an 8px green dot with a ring behind it that scales from 1 to 2.5 and fades from 50% opacity to 0 every 1.6s with an ease-out curve, looping. Give the unread badge on the bell icon a quick 1.15× scale beat on the same rhythm. Use only transform and opacity, and keep both still when prefers-reduced-motion is set.
Paste into Layerwise or any AI coding tool.
What is Pulse animation?
A pulse repeats a small change on a loop: a ring grows out of a dot and fades away, or a badge swells for a moment and settles. It reads as "something is happening here right now," which is why live streams, online indicators, and recording buttons use it.
Use it for states that are truly live or urgent: a broadcast in progress, a connected device, unread messages, or a new feature you want people to notice once. When many things pulse at once the signal disappears, so keep it to one element per screen when you can.
Animate only transform and opacity so the loop stays cheap. A ring that scales from 1 to about 2.5 while fading out over 1.5 to 2 seconds feels calm; under a second it starts to feel like an alarm. Pair the pulse with a label or color so the status is clear without motion, and stop the loop under prefers-reduced-motion.
In Tailwind, animate-ping is this expanding ring. animate-pulse is a different effect that gently fades opacity, and it's mostly used for skeleton screens.
Often confused with
- Skeleton screen
- A skeleton screen fades or shimmers gray placeholders while content loads. A pulse marks something that is live or new.
Related terms
All termsBadge
A small rounded label that marks a status or a count, like New, Beta, Failed, or the red number on an inbox icon.
Looping animation
An animation that plays more than once, either a set number of times or forever, set in CSS with animation-iteration-count.
Glow effect
A soft halo of colored light around a button, card, or text, made with colored shadows or a blurred layer behind the element.
Reduced motion
An operating system setting that asks apps to minimize movement, which websites detect with the prefers-reduced-motion media query.
Build it with Layerwise
Describe your app, watch it run in a live preview, and publish it with a database, storage, and sign-in built in.