--- import DefaultLayout from '@shared/layouts/DefaultLayout.astro' import CaptureScript from '@shared/components/CaptureScript.astro' import Card from '@ui/Card.astro' import CardBody from '@ui/CardBody.astro' import CardTitle from '@ui/CardTitle.astro' import CardSubtitle from '@ui/CardSubtitle.astro' import DocsLink from '@ui/DocsLink.astro' import Button from '@ui/Button.astro' import ButtonList from '@ui/ButtonList.astro' import Badge from '@ui/Badge.astro' ---
Basic Add data-bs-toggle="confetti" to a button. A click pours the shower; it thins out and clears by itself.
Amount and length Set data-bs-count for the number of pieces and data-bs-duration for how long they keep pouring, in milliseconds.
Colors By default the pieces use the Tabler palette. Pass a comma-separated list in data-bs-colors to use your own.
Speed Set data-bs-speed to scale the fall. 1 is the default, a lower value floats, a higher one drops.
Target and events Point data-bs-target at another element. start.bs.confetti and end.bs.confetti fire on that element, not on the trigger.
From JavaScript Call burst() on a tabler.Confetti instance when something else finishes, for example a form that was saved.