The CelebrationFx component creates animated celebration effects using the native Canvas 2D API. Choose between confetti or fireworks animations with multiple trigger modes, customizable colors, and intensity controls. Perfect for success states, achievements, milestones, or interactive celebrations.
Choose between confetti (falling particles) or fireworks (explosive bursts).
Control when the celebration starts with mount (automatic), hover (on mouse enter), click (fires from click position), or manual (controlled via active prop).
Use trigger="click" to fire celebrations from exactly where users click. Perfect for interactive celebrations!
Customize celebration colors using design tokens or any valid CSS color.
Control particle density with intensity and animation speed with speed.
Control the celebration programmatically using trigger="manual" and the active prop.
Use CelebrationFx as a wrapper to overlay celebrations behind any content.
CelebrationFx automatically detects low-end devices and the prefers-reduced-motion system setting. When either is detected, the animation is completely disabled. You can override this with the reducedMotion prop.
See useReducedMotion for details.
The CelebrationFx component extends all layout props from Flex plus the following celebration-specific props:
Use CelebrationFx to add delightful, performant celebration animations to success states, milestones, achievements, or any moment worth celebrating in your application.