BUTTONS

Social CTA Gradient Button

A bold gradient call-to-action button with a smooth shine effect and animated arrow on hover. Copy the HTML and CSS for your own project.

HTML
<button class="cta-gradient-btn">
  <span class="cta-text">Join Now</span>
  <span class="cta-arrow">→</span>
</button>
CSS
.cta-gradient-btn{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:15px 32px;
  border:0;
  border-radius:12px;
  overflow:hidden;
  background:linear-gradient(
    90deg,
    #22d3ee,
    #8b5cf6,
    #d946ef
  );
  color:#ffffff;
  font-size:15px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 10px 30px rgba(139,92,246,.30);
  transition:
    transform .25s ease,
    box-shadow .25s ease;
}

.cta-gradient-btn::before{
  content:"";
  position:absolute;
  top:0;
  left:-120%;
  width:50%;
  height:100%;
  background:linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,.55),
    transparent
  );
  transform:skewX(-20deg);
  transition:left .6s ease;
}

.cta-text,
.cta-arrow{
  position:relative;
  z-index:2;
}

.cta-arrow{
  font-size:20px;
  line-height:1;
  transition:transform .25s ease;
}

.cta-gradient-btn:hover{
  transform:translateY(-3px);
  box-shadow:0 14px 36px rgba(139,92,246,.42);
}

.cta-gradient-btn:hover::before{
  left:140%;
}

.cta-gradient-btn:hover .cta-arrow{
  transform:translateX(6px);
}

How This Social CTA Gradient Button Works

This button combines a multi-color gradient background with an animated shine sweep and a sliding arrow icon to create a bold, attention-grabbing call-to-action. The HTML is simple — a single button element containing two spans: one for the text label (cta-text) and one for the arrow icon (cta-arrow).

There’s no JavaScript involved in this component at all — everything happens through CSS alone. The button’s background uses a linear-gradient blending cyan, purple, and magenta at a 90-degree angle, giving it a vibrant, modern look. The shine effect is created using the ::before pseudo-element, which generates a diagonal white gradient strip positioned outside the button’s visible area (left: -120%) by default. On hover, this strip’s left position transitions to 140%, sweeping it across the entire button over 0.6 seconds — creating the illusion of a light reflection passing over a glossy surface.

The arrow icon adds a second layer of interactivity: on hover, it shifts 6px to the right using transform: translateX(), reinforcing the button’s directional, “click to proceed” feel. Meanwhile, the button itself lifts slightly upward (translateY(-3px)) and its shadow intensifies, adding a subtle sense of depth on interaction.

Customizing This Social CTA Gradient Button

Every visual element of this button can be adjusted directly through CSS:

  • Change the gradient colors — update the three color stops in the background: linear-gradient() value in .cta-gradient-btn to match your brand palette.
  • Adjust the shine speed — the .6s transition duration on the ::before pseudo-element’s left property controls how quickly the shine sweeps across the button.
  • Change the arrow behavior — modify the translateX(6px) value on hover to make the arrow slide further or less on interaction, or replace the arrow character entirely with an icon font or SVG.
  • Adjust the lift effect — the translateY(-3px) value on hover controls how much the button rises; setting it to 0 removes the lift while keeping the shine and shadow effects intact.

Where to Use This Social CTA Gradient Button

This button’s bold, animated style makes it best suited for high-visibility conversion points:

  • Landing page hero sections, where a standout call-to-action like “Join Now” or “Get Started” needs to draw immediate attention.
  • Newsletter or waitlist signup sections, especially on product launch or marketing pages.
  • Pricing page CTAs, where a premium-feeling button reinforces the value of upgrading or signing up.

Because of its vibrant gradient and animated shine, this button works best sparingly — using it for one primary action per page keeps its visual impact strong rather than diluting it across multiple competing buttons.

Want to test this button live before adding it to your project? Open the CodeRipple Playground, paste the HTML and CSS, and experiment with different gradient colors, shine speeds, or arrow animations in real time.

Frequently Asked Questions

Does the shine effect repeat automatically, or only on hover?
It only triggers on hover. The shine strip returns to its starting position once the cursor leaves the button, ready to sweep across again the next time it’s hovered — there’s no automatic looping animation running in the background.

Can I use this button without the arrow icon?
Yes, simply remove the <span class="cta-arrow"> element from the HTML. The button’s gradient background, shine effect, and lift animation will continue to work independently of the arrow.

Will this button work well on a light-colored page background?
Yes, since the button carries its own gradient background and shadow, it maintains strong contrast and visibility regardless of the surrounding page color, unlike effects that rely on a dark background to stand out.

Scroll to Top