Web Buttons HTML / CSS Browser E2E & Sandbox Verified

Animated Gradient Button

Accessible call-to-action button with a smooth animated multi-stop gradient border and glow, reduced-motion support, and zero JavaScript dependencies.

ID: web/animated-gradient-button Version: 1.0.0 License: MIT Framework: Vanilla Web

Sandboxed Live Preview

Isolated iframe (CSP + no same-origin)

Interactive live preview — hover, focus with Tab, or customize the CSS variables below.

Customize Preview

Source Code (2 files)

button.html · html
<div class="demo-stage">
  <button type="button" class="otter-grad-btn">
    <span>Get Started with Otter</span>
    <svg width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">
      <path d="M3 8h10M9 4l4 4-4 4" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
    </svg>
  </button>
</div>

Installation & Usage

Copy button.html and button.css into your web project, or paste the CSS custom properties into your design system stylesheet.

Add class="otter-grad-btn" to any <button> or <a> element. Override --btn-c1, --btn-c2, --btn-radius, or --btn-speed on the element or :root.