2.0 alpha
These docs describe 2.0. Install it with @once-ui-system/core@alpha.
On 1.8.x? Read the 1.x docs
TrademarkTrademarkDocs
Ctrl k
Search docs...
Effects

CelebrationFx

Updated: November 16, 2025
View on GitHub
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:
Prop
Type
Default
type
Which celebration to render.
confettifireworks
confetti
speed
Motion multiplier. Not a duration.
number1
colors
Palette for the pieces.
string[]["brand-solid-medium", "accent-solid-medium"]
intensity
How much of it there is.
number50
duration
Stop after this long, in milliseconds. Runs indefinitely if unset.
number
trigger
What starts it. "manual" hands control to active.
mounthovermanualclick
mount
active
Run it, when trigger is "manual".
booleantrue
reducedMotion
"auto" follows the reader's system setting, which is the right default for anything ambient.
booleanauto
auto
children
React.ReactNode
…and every FlexProps propinherited
Use CelebrationFx to add delightful, performant celebration animations to success states, milestones, achievements, or any moment worth celebrating in your application.
Edit this page on GitHub
TrademarkTrademark
Built with curiosity by Lorant One and the Design Engineers Club