Optionalprops: ConfettiBlockPropsConfiguration object
Height of the confetti canvas. Can be a number (pixels), string (e.g., '80%', '100vh'), or a function that receives params with data and value, returning a number or string. Defaults to '80%'
Custom colors for confetti particles. If not provided, will use CSS variables or fallback colors. Can be a static array of color strings or a function that receives params with data and value, returning an array of colors
Duration to emit new particles before winding down in milliseconds. Default: 5000 (5 seconds)
Custom CSS styles to apply to the confetti canvas
Additional CSS classes to apply to the confetti canvas
Usage with custom colors
confetti({
height: 300,
colors: ['#FF6B6B', '#4ECDC4', '#45B7D1', '#96CEB4', '#FECA57']
});
Usage with dynamic height based on params with data and value
confetti({
height: ({data}) => data.containerHeight || 300
});
Confetti animation component displaying animated confetti particles.