25 CSS Button Groups
18 / 25

All 25 in 25 CSS Button Groups

  1. 01CSS Split Button with Anchor-Positioned Popover Menu (Popover API, No JS)
  2. 02CSS Segmented Control with Motion-Path Comet Thumb (offset-path Arc Travel)
  3. 03CSS View Transitions Toggle Button Group with Morphing Thumb (Shared-Element FLIP)
  4. 04CSS Pricing Toggle with Monthly / Yearly Switch (Pure CSS, No JavaScript)
  5. 05CSS Segmented Control with Sliding Thumb Indicator (iOS-Style, Pure CSS)
  6. 06CSS Split Button Dropdown with Native <details> (Primary Action + Menu)
  7. 07CSS Icon Button Group for Toolbar Actions (Accessible Tooltips, Pure CSS)
  8. 08CSS Pill Radio Button Group with Sliding Indicator (Filter Pills, Pure CSS)
  9. 09CSS Toggle Button Group with Radio Inputs (Single-Select Alignment Group)
  10. 10CSS Wallet Connect Button Grid for Web3 Sign-In (MetaMask, WalletConnect, Coinbase)
  11. 11CSS AI Model Selector Button Group with Provider Badges (LLM Model Picker)
  12. 12CSS Segmented Control with Liquid Mercury Thumb (Metallic Stretch Animation)
  13. 13CSS Button Group with Subgrid Underline Beam (Perfectly Aligned Tab Indicator)
  14. 14CSS Multi-Select Chip Buttons with Acid Glow (Toggleable Tag Filters)
  15. 15CSS Split Button with Quantum Chevron Reveal (Animated Menu Materialize)
  16. 16CSS Format Toggle Button Group with Conic Fill (Radial Sweep Select)
  17. 17CSS Pixel Matrix Button Group with LED Segment Glow (Retro Display Buttons)
  18. 18CSS Multi-Action Button Group with Gradient Flow Progress (Animated CTA Bar)
  19. 19CSS Icon Segmented Control with Holographic Sheen (Iridescent View Switcher)
  20. 20CSS Vertical Button Stack with 3D Hover Depth (Tilting Card Buttons)
  21. 21CSS Floating Action Button with Radial Sub-Button Menu (Arc Fan-Out, Pure CSS)
  22. 22CSS Filter Button Group with RGB-Split Glitch Active State (Cyberpunk Toggle)
  23. 23CSS Pill Button Group with Rotating Conic Plasma Border (Animated Gradient Ring)
  24. 24CSS Action Button Row with Radar Shockwave Click Feedback (Ripple Pulse)
  25. 25CSS Date-Range Preset Button Group with Cursor-Following Glow (Spotlight Hover)
Pure CSSMIT licensed

CSS Multi-Action Button Group with Gradient Flow Progress (Animated CTA Bar)

A multi-action button bar — Save / Publish / Share — where the primary action carries a perpetually flowing gradient that reads as live momentum, and a determinate progress fill sweeps across on activation. The eye-catching 'CSS multi-action button group gradient flow progress' for CTA bars, wizards and deploy panels.

Live Demo
Plain CSSTailwind v4
Try it

Build UI like this from scratch: Flexbox, Grid, animations & responsive CSS

ZTM · The CSS Bootcamp · 30‑day money-back guarantee · Affiliate link

10% off at checkout with code
Check ZTM Course

The code

<section class="btn-18" aria-label="Gradient flow multi-action button group demo">
  <div class="btn-18__wrap">
    <p class="btn-18__label">Ready to ship</p>
    <div class="btn-18__bar" role="group" aria-label="Publish actions">
      <button type="button" class="btn-18__primary">Publish now</button>
      <button type="button" class="btn-18__ghost">Save draft</button>
      <button type="button" class="btn-18__ghost">Share link</button>
    </div>
  </div>
</section>
@property --btn-18-p {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

.btn-18,
.btn-18 *,
.btn-18 *::before,
.btn-18 *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.btn-18 {
  font-family: 'Segoe UI',system-ui,sans-serif;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 120% at 80% 0%,#13182a,#080a14);
  padding: 44px 20px;
}

.btn-18__wrap {
  width: min(560px,100%);
}

.btn-18__label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8ea0ff;
  margin: 0 0 14px 2px;
}

.btn-18__bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-18__primary {
  position: relative;
  border: none;
  height: 54px;
  padding: 0 30px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
  color: #0a0e1c;
  cursor: pointer;
  overflow: hidden;
  background: linear-gradient(90deg,#4d7cff,#c04dff,#ff5db8,#4d7cff);
  background-size: 250% 100%;
  animation: btn-18-flow 4s linear infinite;
  box-shadow: 0 14px 34px -14px rgba(120,90,255,.8);
}

@keyframes btn-18-flow {
  to {
    background-position: 250% 0;
  }
}

.btn-18__primary::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--btn-18-p);
  background: rgba(255,255,255,.28);
  border-right: 2px solid rgba(255,255,255,.7);
  transition: none;
}

.btn-18__primary:active {
  animation-play-state: paused;
}

.btn-18__primary:active::after {
  animation: btn-18-fill 1.4s cubic-bezier(.4,0,.2,1) forwards;
}

@keyframes btn-18-fill {
  from {
    --btn-18-p: 0%;
  }

  to {
    --btn-18-p: 100%;
  }
}

.btn-18__primary:hover {
  filter: brightness(1.08);
}

.btn-18__ghost {
  border: 1.5px solid #2b3452;
  background: rgba(255,255,255,.03);
  height: 54px;
  padding: 0 24px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  color: #c5d0f0;
  cursor: pointer;
  transition: border-color .18s,background .18s;
}

.btn-18__ghost:hover {
  border-color: #4a5a88;
  background: rgba(255,255,255,.06);
}

.btn-18__primary:focus-visible,
.btn-18__ghost:focus-visible {
  outline: 3px solid #8ea0ff;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .btn-18__primary {
    animation: none;
    background-position: 0 0;
  }

  .btn-18__primary:active::after {
    animation: none;
    width: 100%;
  }
}
Paste this into ChatGPT, Claude, Cursor, or any coding assistant. The block below is pre-framed with everything the AI needs to integrate this demo into your project — markup, styles, scoping notes, and the source URL. Hit Copy and paste straight into your chat.
Here's a working CSS Button Group from CodeFronts. Use it as-is or adapt to your framework. All classes are scoped under a unique prefix so the code won't collide with your existing styles. MIT licensed.
Demo: CSS Multi-Action Button Group with Gradient Flow Progress (Animated CTA Bar)
Source: https://codefronts.com/components/css-button-groups/gradient-flow/

A multi-action button bar — Save / Publish / Share — where the primary action carries a perpetually flowing gradient that reads as live momentum, and a determinate progress fill sweeps across on activation. The eye-catching 'CSS multi-action button group gradient flow progress' for CTA bars, wizards and deploy panels.
## HTML
```html
<section class="btn-18" aria-label="Gradient flow multi-action button group demo">
  <div class="btn-18__wrap">
    <p class="btn-18__label">Ready to ship</p>
    <div class="btn-18__bar" role="group" aria-label="Publish actions">
      <button type="button" class="btn-18__primary">Publish now</button>
      <button type="button" class="btn-18__ghost">Save draft</button>
      <button type="button" class="btn-18__ghost">Share link</button>
    </div>
  </div>
</section>
```
## CSS
```css
@property --btn-18-p {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

.btn-18,
.btn-18 *,
.btn-18 *::before,
.btn-18 *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.btn-18 {
  font-family: 'Segoe UI',system-ui,sans-serif;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 120% at 80% 0%,#13182a,#080a14);
  padding: 44px 20px;
}

.btn-18__wrap {
  width: min(560px,100%);
}

.btn-18__label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8ea0ff;
  margin: 0 0 14px 2px;
}

.btn-18__bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-18__primary {
  position: relative;
  border: none;
  height: 54px;
  padding: 0 30px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
  color: #0a0e1c;
  cursor: pointer;
  overflow: hidden;
  background: linear-gradient(90deg,#4d7cff,#c04dff,#ff5db8,#4d7cff);
  background-size: 250% 100%;
  animation: btn-18-flow 4s linear infinite;
  box-shadow: 0 14px 34px -14px rgba(120,90,255,.8);
}

@keyframes btn-18-flow {
  to {
    background-position: 250% 0;
  }
}

.btn-18__primary::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--btn-18-p);
  background: rgba(255,255,255,.28);
  border-right: 2px solid rgba(255,255,255,.7);
  transition: none;
}

.btn-18__primary:active {
  animation-play-state: paused;
}

.btn-18__primary:active::after {
  animation: btn-18-fill 1.4s cubic-bezier(.4,0,.2,1) forwards;
}

@keyframes btn-18-fill {
  from {
    --btn-18-p: 0%;
  }

  to {
    --btn-18-p: 100%;
  }
}

.btn-18__primary:hover {
  filter: brightness(1.08);
}

.btn-18__ghost {
  border: 1.5px solid #2b3452;
  background: rgba(255,255,255,.03);
  height: 54px;
  padding: 0 24px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  color: #c5d0f0;
  cursor: pointer;
  transition: border-color .18s,background .18s;
}

.btn-18__ghost:hover {
  border-color: #4a5a88;
  background: rgba(255,255,255,.06);
}

.btn-18__primary:focus-visible,
.btn-18__ghost:focus-visible {
  outline: 3px solid #8ea0ff;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .btn-18__primary {
    animation: none;
    background-position: 0 0;
  }

  .btn-18__primary:active::after {
    animation: none;
    width: 100%;
  }
}
```

How this works

The bar groups a primary and two secondary actions. The primary button's background is an oversized linear-gradient whose background-position animates left-to-right forever, giving a flowing-liquid look with no JS. On the :active/loading state, a second layer — a determinate fill driven by an @property percentage — sweeps across to show progress.

Secondary buttons stay ghost-styled so hierarchy is instantly clear. The flow uses a wide gradient (background-size:250%) and a slow linear keyframe; the progress layer uses @property --p so the width animates smoothly and could be bound to real upload progress.

@property --btn-18-p{ syntax:'<percentage>'; inherits:false; initial-value:0% }
.primary{ background-size:250% 100%; animation:btn-18-flow 4s linear infinite }

Techniques used: animated background-position gradient flow · @property percentage progress fill · clear primary/secondary hierarchy · GPU-friendly background animation · bindable progress variable · reduced-motion freeze

Make it yours

  • Flow palette = the primary's gradient stops (blue→pink→violet here).
  • Flow speed = the btn-18-flow duration.
  • Bind --btn-18-p to real progress via style.setProperty('--btn-18-p', pct).
  • Add more secondary actions; they share the ghost style.

Gotchas — read before shipping

  • A constantly-moving gradient can distract — keep it slow and pause it under prefers-reduced-motion.
  • Progress must be perceivable without color (a % label or the sweep edge), not hue alone.
  • Keep secondary actions visibly lower-emphasis so users don't miss the primary.
  • @property progress needs registration to animate; fall back to a CSS transition on width otherwise.

Browser support

ChromeSafariFirefoxEdge
85+16.4+128+85+

@property Baseline 2024; the flowing gradient works everywhere. Without @property, drive progress with a width transition instead.

Techniques used in this demo

Search CodeFronts

Loading…