Confetti
Burst of colored particles emitted on demand via an imperative Fire() method. Perfect for celebrations and success states.
When to Use
- Celebrate a user milestone (form submitted, goal reached, purchase complete).
- Make a "tada" moment more memorable with a single confetti burst.
- Use the imperative
Fire()method via@refto trigger programmatically.
API Reference
| Property | Type | Default | Description |
|---|---|---|---|
| ChildContent | RenderFragment? | null | Content inside the confetti container (e.g. a trigger button). |
| ParticleCount | int | 80 | Number of confetti particles per burst. |
| Spread | int | 70 | Spread angle in degrees. |
| Colors | string[]? | null | Hex colors for particles. Defaults to a festive palette. |
| OriginX | double | 0.5 | Burst origin X (0–1, relative to element width). |
| OriginY | double | 0.5 | Burst origin Y (0–1, relative to element height). |
Imperative API: Capture a reference with
@ref="_confettiRef"
and call await _confettiRef!.Fire() from any event handler.