Update v4.2 - New components, 10+ framework guides, and quality improvements. Visit Changelog

Tailwind CSS Confetti Animation

Add celebratory flair to your website with Tailwind CSS Confetti! Lightweight, customizable, and easy to integrate for fun, animated confetti effects.

Requires Additional Installation

Note that this component requires the use of the third-party Canvas Confetti plugin.

Installation

  1. Install Canvas Confetti.

    Install Canvas Confetti via npm

    Terminal
                              
                                npm i canvas-confetti
                              
                            
  2. Add the Canvas Confetti JavaScript

    Include the JavaScript <script> near the end of your </body> tag:

    HTML
                              
                            

Trigger on click

Trigger a confetti burst from a button click or any other user action.

© 2026 Preline Labs.