This vignette demonstrates the visual effects available in
sparkler.
The package includes two types of effects:
weather effects such as snow, rain, and meteors, which can be rendered inline or as a full-screen overlay
celebration effects such as confetti and fireworks, which are typically used as overlays in presentations, dashboards, and Shiny apps
These effects are rendered using HTML5 Canvas.
Use sparkler::weather() to create ambient backgrounds.
By default in R Markdown, these render in a contained box.
confetti() and fireworks() are designed
primarily for celebratory overlays. In documents, they are triggered
when the widget is rendered. In presentation formats such as Quarto
revealjs, they are especially useful on slides where the effect should
appear when the slide becomes active.
weather(..., fullscreen = FALSE) when you want the
effect contained inside a region of the page.weather(..., fullscreen = TRUE) when you want a
full-screen overlay. A dark background is recommended so the effect is
easier to see.confetti() and fireworks() are best suited
to presentations and interactive applications such as Shiny.