04.15 ยท Micro-Interactions

Notification Badge Pulse

A badge on an icon pulses to catch the eye. Best for unread messages.

Watch it

It moves by itself. Pause it, or click an icon to clear its badge; Reset brings the badges back.

๐Ÿ””
3
Number
๐Ÿ“ฅ
Dot
๐Ÿง‘
Online

Try it

Change a setting and see the difference as it moves.

Pulse style

Grow stays contained; Ring spreads a soft halo.

Speed

Fast feels urgent; slow is easy to miss.

How much it grows

Much bigger than a third starts to feel alarming.

More optionsFewer options

Pulses three times to be noticed, then rests.

Badge color

Red reads as new and urgent.

Copy the prompt

Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.

Add a pulsing notification badge to [the icon that has something new, such as a bell or an inbox]. Place a small colored dot or number on the icon's corner and let it pulse, growing and settling back or sending a soft ring outward, so it catches the eye without demanding attention. Give the badge a thin border in the background color so it seems to float above the icon. Remove the badge once the visitor has opened what it points to, and when the settings ask for it, stop the pulse after three beats. If the visitor has reduced motion turned on, keep the badge still. Match the settings listed below.

Replace the words in brackets with your own element. Your settings are added at the end.

Free and open source. If this helped, a star on GitHub helps other people find it.

Star on GitHub

What it is

The full explanation is in README.md.

Good for

  • Notification bells
  • Inboxes
  • Chat icons
  • Online status

Avoid on

  • Items already seen
  • Many icons at once