Presets

CSS animation blink

A 'live' badge with a blinking dot: hard on/off like an LED or a smooth fade.

CSSTailwindReactGIFMP4
trigger: loop
00.000 / 1.000s
timing
style
content
12 max

npm i motion · the component uses motion/react

How it works

This preset shows a CSS blink animation the way it is most often used today: a "LIVE" pill with a small red dot that blinks. The dot is a 9px circle with a matching box-shadow halo, next to a bold, letter-spaced label inside a translucent rounded badge.

The blink keyframe is simple: opacity 1 at the start and end, 0.1 at 50%. What changes the character is the Blink style option, which sets the timing function. Smooth uses ease-in-out, so the dot fades out and back in like a breathing light. Hard uses steps(1, end), which removes all in-between frames: the dot is fully on for half the cycle and dim for the other half, like an LED or the old text cursor.

Use it for live streams, recording indicators, server status, "new" markers or a cursor in a terminal-style UI. Parameters: Label, Dot color, Duration and Blink style. A Duration of 1s gives one blink per second, which reads as calm. Pick Hard for status lights and recording, Smooth for softer "online" presence.

Opacity is compositor-friendly, so even many badges cost nothing noticeable. Be careful with fast settings: WCAG 2.3.1 limits content to three flashes per second, and at the 0.2s minimum Duration a hard blink comes close to that limit on a high-contrast dot. The dot is aria-hidden; the label carries the meaning.

How do I make a hard on/off blink in CSS?

Use a stepped timing function. With steps(1, end) the browser holds each keyframe value until the next one, so opacity jumps from 1 to 0.1 at the halfway point and back at the end of the cycle, with no fade. Choose Hard in the Blink style option and the exported code uses exactly that.

Can I blink the text instead of the dot?

Yes. Move the animation from the dot element to the label, or to the whole badge. Blinking text is harder to read and more distracting than a blinking dot, so keep the duration at 1s or slower and use it only for brief states. The old HTML blink tag disappeared for good reasons.

How do I stop the blink after a while?

Change the iteration count from infinite to a number like 5 in the copied CSS, and the dot will settle at full opacity afterwards (it ends at the 100% keyframe, which is opacity 1). In React, set the transition's repeat to that number. You can also remove the class when the live state ends.

relatedMore like this

all css animations →

Export

format
height

480p max · small watermark · 3 per day · remove limits