All styles
Playful

Confetti Rain CSS Button

Free52 lines · no JS · WCAG AA 5.2
Open in Studio
Theme

A real <button> carrying .btn-confetti-rain — the preview is the stylesheet, not a picture of it.

States
default
hover
focus-visible
active
disabled
not declared
.btn-confetti-rain {
  position: relative;
  z-index: 0;
  overflow: hidden;
  display: inline-block;
  padding: 12px 28px;
  border: none;
  border-radius: 12px;
  background: #7c3aed;
  color: #f5f3ff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.1s ease;
}
.btn-confetti-rain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle 2px at 7px 7px, #fde047 97%, transparent),
    radial-gradient(circle 2px at 25px 18px, #5eead4 97%, transparent),
    radial-gradient(circle 2px at 14px 32px, #fda4af 97%, transparent),
    radial-gradient(circle 2px at 33px 38px, #c4b5fd 97%, transparent);
  background-size: 44px 44px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn-confetti-rain:hover {
  background: #6d28d9;
}
.btn-confetti-rain:hover::after {
  opacity: 1;
  animation: btn-confetti-rain-fall 1.6s linear infinite;
}
.btn-confetti-rain:active {
  transform: scale(0.97);
}
@keyframes btn-confetti-rain-fall {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 44px;
  }
}
.btn-confetti-rain:focus-visible {
  outline: 2px solid #7c3aed;
  outline-offset: 3px;
}
Self-contained · MIT · no build step.btn-confetti-rain
PlayfulRoundedParticlesAnimatedHover Reveal

Implementation notes

About the Confetti Rain CSS button

Confetti Rain uses expressive color, shape and feedback for characterful products. Its rounded corners balance product-friendly softness with a clear boundary. Motion comes from a 1.6s keyframe animation. The particles, animated, hover reveal details are included in the copy-paste CSS.

Usage

<button class="btn-confetti-rain">Button</button>

Pair it with the CSS tab above — the class is self-contained.

Before shipping: keep the semantic button element, verify contrast on your actual background and add a visible:focus-visible state. If you retain motion, include a prefers-reduced-motion override.
Built with
HTML + plain CSS
Shape
Rounded
Exports
CSS, Tailwind, React
License
MIT · commercial use
Complete the look

Build the interface around this button

We matched its palette, surface, geometry and motion to a complete UI system — like composing an outfit, not browsing unrelated parts.

Style DNA · v1
How matching works →
Pro preview
Modal83% match

Tactile Citrus Decision Modal

Tactile Citrus kit

solid surface3D & Tactile character
Unlock with Pro →
Free sample
Input83% match

Tactile Citrus Smart Input

Tactile Citrus kit

solid surface3D & Tactile character
Pro preview
Toggle83% match

Tactile Citrus Preference Toggle

Tactile Citrus kit

solid surface3D & Tactile character
Unlock with Pro →
Pro preview
Card83% match

Tactile Citrus Feature Card

Tactile Citrus kit

solid surface3D & Tactile character
Unlock with Pro →
Pro preview
Dropdown83% match

Tactile Citrus Action Menu

Tactile Citrus kit

solid surface3D & Tactile character
Unlock with Pro →
Pro preview
Form83% match

Tactile Citrus Signup Form

Tactile Citrus kit

solid surface3D & Tactile character
Unlock with Pro →
Get the complete Tactile Citrus kit
Six coordinated component types, commercial license and future kit updates.
Explore Pro · $39

More styles that match

Party Popper

Rainbow Pop

Blob Organic

Backflip

Bounce Joy

Comic Book

Two optional extras load only if you allow them. Every button, preview and line of code works exactly the same either way. What each one does