StealThis .dev

Pulsating Button

A call-to-action button with a pulsing glow ring animation that draws attention and encourages clicks.

Open in Lab
css javascript vue svelte
Targets: TS JS HTML React Vue Svelte

Code

Pulsating Button

A button with a continuously pulsing glow ring that radiates outward, creating an eye-catching call-to-action effect perfect for hero sections and landing pages.

How it works

  1. A CSS @keyframes pulse animation expands a box-shadow outward from the button
  2. The shadow grows in size while fading in opacity, creating a radiating ring effect
  3. The animation loops infinitely with a smooth ease-out timing

Customization

  • Color: Change the --pulse-color CSS variable to match your brand
  • Speed: Adjust animation-duration for faster or slower pulses
  • Intensity: Modify the box-shadow spread values in the keyframes

When to use it

  • Primary CTA buttons on hero sections
  • Sign-up or subscribe buttons
  • Any action you want to draw immediate attention to