shadcn.io is not affiliated with official shadcn/ui
A fire burns along the whole bottom edge: tongues of flame lick upward and keep changing shape, a white-hot band glows at their base, embers drift up through the box, and the firelight flutters gently over everything, so the box is lit by the fire rather than filled with it. Each sheet of flame is a gradient of fire colours cut by two noise textures the browser draws once and CSS slides upward at different speeds, so the tongues reshape as they rise and nothing repaints. It follows your theme: glowing flames on a dark page, a warm amber blaze on a light one.
Use it for a seasonal hero, a "cosy" product page or a card that should feel warm. For grey plumes that rise over the whole box, use Smoke; for points of warm light with no flame, Fireflies; for sparks that burst in the sky, Fireworks. Keep your headline in the upper half, above the flames.
Installation
Usage
import { Fireplace } from "@/components/ui/fireplace";The fire burns behind whatever you put inside, along the container's bottom edge. Give the container a height; for the whole page, render it empty with className="fixed inset-0 -z-10".
<Fireplace className="flex min-h-[420px] flex-col items-center pt-16">
<h1 className="text-4xl font-semibold">Pull up a chair</h1>
</Fireplace>Demos
A low hearth
intensity="subtle" keeps the flames under a third of the height and embers={8} thins the sparks, for a small card. The tongues scale with the fire, so a low hearth still looks like a fire, not a cropped one.
Witch-fire
colors takes four colours, from the fire's heart to the tips of the flames; here pale cyan to deep blue. flicker={false} stills the light's flutter and the flames' swell, for a steadier burn behind busier content. The card adds the dark class to its own container, so it glows on a light page too.
Accessibility
The fire is decorative: it's hidden from assistive tech and never takes the pointer, and your content stays on top in normal flow. With reduced motion every flame and ember stops where it is, so a still, fully formed fire stays. Nothing flashes: the light flutters by less than a fifth of its strength, eased over half a second or more.
Put copy over it in your foreground colour (text-foreground) and keep it above the flames, in the upper half at the default intensity; there it stays well above 4.5:1 in both color schemes.
FAQ
Will it slow the page down?
No. The flames are two sheets, each a gradient under two sliding noise textures, and 22 embers rise with translate: all of it is composited without repainting, and no script runs per frame. The textures are drawn once, as images.
How do I change the flame colours?
Pass four colours to colors, from the white-hot heart to the tips; fewer are repeated. You can also set --fireplace-color-1 to --fireplace-color-4 in your CSS. Without them, each theme has its own palette: added light on a dark page, warm pigment on a light one.
How tall are the flames?
intensity sets it: subtle is a low hearth, under a third of the height; medium about two fifths; strong a blaze well over half. You can also set --fireplace-height to any length, such as 50cqh.
Can it burn steadily?
flicker={false} stills the light's flutter and the slow swell of the flames. The tongues still lick upward; with reduced motion everything stops.
Can the flames move faster or slower?
speed multiplies how fast they rise: 2 is twice as fast, 0.5 half as fast. The embers follow the same speed.
What does it look like in light mode?
A warm amber blaze on a cream page: on a light surface the flames are drawn as warm pigment multiplied into the page, rather than as light added to a dark scene. For the glowing hearth on a light page, add the dark class to the container, as the witch-fire demo does.
API Reference
Fireplace
<div> data-slot="fireplace"
colors?string[]
Four CSS colours for the fire, from its white-hot heart to the tips of the flames, repeated when there are fewer. By default a palette per theme: warm white to deep red on a dark page, amber to brick on a light one.
embers?number
How many embers drift up through the box, from 0 to 32.
- Default
22
flicker?boolean
The light's flutter and the flames' slow swell; false keeps a steady
glow behind busy content (the flames still lick upward).
- Default
true
intensity?"subtle" | "medium" | "strong"
How tall the fire burns: subtle is a low hearth (under a third of the
height), strong a blaze (well over half).
- Type
"subtle" | "medium" | "strong"- Default
"medium"
speed?number
How fast the flames and embers rise: 2 is twice as fast, 0.5 half as fast.
- Default
1
render?ReactElement | ((props: object, state: object) => ReactElement)
Replace the host element or compose it with another component.
- Type
ReactElement | ((props: object, state: object) => ReactElement)
className?string
Merged with the part's classes.
--fireplace-color-1string
The fire's heart (warm white; amber on a light page).
--fireplace-color-2string
The flames' body and the embers (amber).
--fireplace-color-3string
The flames' edges and the glow (orange).
--fireplace-color-4string
The tips (deep red; brick on a light page).
--fireplace-heightstring
How tall the flames burn (42cqh).
--fireplace-speedstring
How fast it rises, a multiplier (1).
Related
- Pro


Smoke Background
WeatherThe same rising plumes, cool and grey, over the whole area
- Pro


Fireflies Background
ParticlesWarm points of light with no flame
- Pro


Fireworks Background
ParticlesSparks that burst in the sky instead of rising from a hearth
- Pro


Bokeh Background
ParticlesSoft glowing circles, calmer
- Pro


Corona Background
LightWarm light from the top edge instead of the bottom
- Pro


Heatmap Background
GradientsThe warm palette as a full field