Confetti
RzConfetti is an SSR-first behavioral wrapper that decorates child content with client-side confetti effects powered by Alpine and canvas-confetti.
It is decorative only and should be paired with explicit success messaging, status text, or navigation feedback. RizzyUI components render stable HTML on the server. Your receipt has been emailed. Trigger the custom browser event to fire confetti. Confetti stays inside this region. Available presets: Confetti canvases are rendered as decorative surfaces with Reduced-motion support is enabled by default with RzConfetti follows that model by emitting deterministic markup, then attaching optional Alpine behavior in the browser with no Blazor event callbacks.<RzConfetti>
<RzButton>Celebrate</RzButton>
</RzConfetti>Payment complete
<RzConfetti Trigger="ConfettiTrigger.Load" Preset="ConfettiPreset.Victory" BurstCount="3">
<RzCard class="p-6">
<CardTitle>Payment complete</CardTitle>
<CardDescription>Your receipt has been emailed.</CardDescription>
</RzCard>
</RzConfetti><RzConfetti Trigger="ConfettiTrigger.CustomEvent" EventName="order:success" Preset="ConfettiPreset.DualCannons">
<RzButton type="button">Wait for order event</RzButton>
</RzConfetti>
<script>
window.dispatchEvent(new CustomEvent('order:success'));
</script>Hover this card
<RzConfetti Mode="ConfettiMode.Scoped" Trigger="ConfettiTrigger.Hover" Preset="ConfettiPreset.Subtle">
<RzCard class="p-6">
<CardTitle>Hover this card</CardTitle>
<CardDescription>Confetti stays inside this region.</CardDescription>
</RzCard>
</RzConfetti>DefaultBurst, CannonLeft, CannonRight, DualCannons, Victory, Subtle, and Stars.<RzConfetti Preset="ConfettiPreset.CannonLeft" />
<RzConfetti Preset="ConfettiPreset.CannonRight" />
<RzConfetti Preset="ConfettiPreset.DualCannons" BurstCount="2" />
<RzConfetti Preset="ConfettiPreset.Victory" BurstCount="4" BurstIntervalMs="120" />aria-hidden="true". The wrapper does not move focus and does not replace semantic success feedback.DisableForReducedMotion="true".RzConfetti resolves scripts through logical asset keys via ComponentAssetKeys. This keeps asset URLs centralized in RizzyUI configuration instead of hardcoded in component markup.Property Type Notes TriggerConfettiTriggerClick, hover, load, visible, custom-event, or manual orchestration. ModeConfettiModeOverlay, scoped, or element-origin launch behavior. PresetConfettiPresetHigh-level preset mapped to stable option bundles. Disabled, Once, CooldownMsbool, bool, intControl trigger behavior and rate limits. BurstCount, BurstIntervalMsint, intDefines burst sequence depth and cadence. ParticleCount, Spread, Angle, etc.Nullable numbers/bools/arrays Optional fine-grained overrides merged with the chosen preset. DisableForReducedMotionboolDefaults to true.ComponentAssetKeysstring[]Defaults to ["CanvasConfetti"].