Burn
Sets whatever it wraps on fire. The content burns away from a corner with a charred edge, a glowing rim, flickering flames and drifting sparks.
Installation
pnpm dlx shadcn@latest add @breeze/burnUsage
import { Burn } from "@/components/breeze/burn"Wrap anything: a card, an image, a paragraph. Set burning to start the fire. The content is cut away by the flames, so whatever sits behind it shows through the holes, and it's gone once the burn ends. Set burning back to false to restore it.
<Burn burning={burning} origin="bottom-left" onBurnt={() => setDeleted(true)}>
<Card />
</Burn>Props
| Prop | Type | Default | Description |
|---|---|---|---|
burning | boolean | Start the burn. Back to false restores the content | |
origin | "bottom-left" | "bottom-right" | "top-left" | "top-right" | "bottom" | "center" | "bottom-left" | Where the fire starts |
duration | number | 1500 | How long the burn takes, in ms |
embers | boolean | true | Sparks drifting up as the front passes |
onBurnt | () => void | Called once the content has burnt away | |
className | string | Classes for the wrapper |
The burn is an SVG filter on the content itself, so it works on any markup, text included. Heat is fractal noise plus a point of heat at origin, scaled to the element's size, so it eats in from that side with a ragged front. Behind the front there's a thin charred line, a glowing rim with a white-hot core and flames that flicker along it. Each instance burns in its own pattern. With reduced motion it fades out instead.
Once the burn ends the content is made inert and hidden from screen readers, so nothing invisible can still be clicked, focused or read out. Setting burning back to false makes it interactive again. Other props such as id, style or data-* go on the wrapper.