Components general

ConfettiTrigger

Triggers a confetti explosion on page load, button click, or manually. Uses hardware‑accelerated canvas animation for celebration moments such as form‑submission success, milestone achievements, or festive events.

Actualizado Mar 6, 2026

ConfettiTrigger

Triggers a confetti explosion on page load, button click, or manually. Uses hardware‑accelerated canvas animation for celebration moments such as form‑submission success, milestone achievements, or festive events.

Use Cases

  • Form submission success celebration (RSVP, registration, purchase)
  • Landing page hero celebration on load (festive events)
  • Interactive ‘Celebrate’ button for engagement
  • Event registration confirmation pages
  • Milestone achievement pages (completed course, reached goal)
  • Contest winner announcement pages

Properties

trigger

When to fire confetti. Type: string. Options: on-load, on-click, manual. Default: on-load.

Tip: landing_page → on-load (fires automatically after 300 ms delay); success_page → on-load (celebrates form submission success); interactive → on-click (user triggers celebration); future → manual (for script integration – currently hidden)

colors

Comma-separated list of hex color codes for confetti particles. Type: string. Default: #ff0000, #00ff00, #0000ff, #ffff00, #ff00ff.

particleCount

Number of confetti particles (50‑300). Lower = subtle, higher = energetic. RECOMMENDED: 100‑200 for mobile performance. Type: number. Default: 150.

spread

Angle spread in degrees (0‑360). 70° = focused burst, 180° = wide spray, 360° = omnidirectional explosion. Type: number. Default: 70.

origin

Origin point for confetti (x: 0‑1 horizontal, y: 0‑1 vertical). { x: 0.5, y: 0.5 } = center. Type: object. Default: {"x":0.5,"y":0.5}.

duration

Animation duration in milliseconds (1000‑10000). 3000 ms (3 seconds) is balanced. Type: number. Default: 3000.

clickableText

Button text (only used if trigger='on-click'). Type: string. Default: Celebrate!.

buttonVariant

Button style (only used if trigger='on-click'). Type: string. Options: primary, secondary. Default: primary.

Best Practices

  • CRITICAL: ONLY use for emotionally appropriate moments (celebrations, success, weddings, events)
  • NEVER use for business form submissions or professional apps (distracting and unprofessional)
  • Use trigger='on-load' for landing pages with celebration theme
  • Use trigger='on-click' for interactive celebration buttons
  • Limit particleCount to 100‑200 for performance (mobile‑friendly)
  • Choose colors matching brand palette (avoid default rainbow for professional contexts)
  • Respects prefers‑reduced‑motion for accessibility (confetti disabled automatically)
  • For wedding RSVP success: use soft pastel colors (#ffb6c1, #f5d0fe, #fce7f3, #ffd700)
  • For high‑energy events: use vibrant colors (#ff0000, #00ff00, #0000ff, #ffff00)

Common Mistakes

Using ConfettiTrigger for business/SaaS form submissions

Why it's a problem: Confetti is unprofessional in business contexts - distracting and childish

Fix: ONLY use for celebrations, weddings, events. For SaaS, use simple success message with checkmark.

Using default rainbow colors for weddings

Why it's a problem: Rainbow colors (#ff0000, #00ff00, #0000ff) clash with elegant wedding aesthetic

Fix: Use soft pastels for weddings: #ffb6c1, #f5d0fe, #fce7f3, #ffd700

Setting particleCount > 200 on mobile

Why it's a problem: High particle counts lag on mobile devices

Fix: Use 100‑200 particles for mobile‑friendly performance

Using trigger='on-load' for every page

Why it's a problem: Confetti on every page is annoying and loses impact

Fix: ONLY use on-load for landing/success pages. Reserve confetti for special moments.

Etiquetas

confettitrigger animations form submission landing page interactive button

Componentes relacionados

¿Listo para crear?

Comienza a crear tu aplicación de forma gratuita con Qödiak.

Comenzar gratis

Artículos relacionados

AnimatedGradient

Smooth animated gradient background for modern, premium aesthetics. Supports linear and radial gradients with configurable colors, animation speed, and intensity. GPU‑accelerated for smooth 60fps performance.

Button

Interactive button component that supports link navigation, page data source operations (record navigation, new record, mode switching), form submission, and custom JavaScript execution. Save/Delete actions must use a custom‑script with navigation. Two visual variants are available, and the button can be enabled or disabled dynamically based on data context.

Calendar

A full‑featured calendar component built with react‑big‑calendar. It can display events in month, week, day, or agenda views and includes navigation and view‑switching capabilities, making it suitable for any site that needs scheduling, event management, or date visualization.

Card

Feature card component with an icon, title, description, and entrance animations. Ideal for showcasing features, services, or benefits in grid layouts with animation support.

Checkbox

A checkbox group component that lets users select multiple options from a predefined list. It renders a set of checkboxes with individual labels and can be arranged vertically or horizontally.

CountdownTimer

Real-time countdown timer component that displays the time remaining until a target date/time. It updates every second, offers customizable formatting, and shows a completion message when the countdown ends. Suitable for any site type.