CSS Pulsing CTA Button

A call-to-action button that sends out a soft pulse to draw the eye.

  • pulse
  • cta
  • attention
  • animation
  • green
HTML
<button class="btn-pulse">Start free trial</button>
CSS
.btn-pulse {
  padding: 14px 30px;
  border: 0;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font: 700 16px/1 system-ui, sans-serif;
  cursor: pointer;
  animation: btn-pulse 2s infinite;
}

@keyframes btn-pulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55); }
  70% { box-shadow: 0 0 0 16px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .btn-pulse {
    animation: none;
  }
}

About this CSS Pulsing CTA Button

This CSS Pulsing CTA Button is 22 lines of pure CSS (0.5 KB) with no JavaScript and no dependencies. It uses keyframe animations, box shadows 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:

  • #16a34a
  • #fff

How to use this pulsing cta button

  1. Copy the HTML and paste it where you want the element to appear.
  2. Copy the CSS into your stylesheet, or inside a <style> tag.
  3. Keep the .btn-pulse class name, or rename it in both places. Then tweak colors, sizes and timing to match your design.
  4. Using React or Next.js? Change class to className in 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.

Feedback