shadcn.io is not affiliated with official shadcn/ui
Soft plumes rise from below the bottom edge, swell, turn and thin out, like smoke from a fire or haze on a stage. Each puff is a gradient circle textured by one fixed noise image, and CSS keyframes move, grow and turn it; as it turns, its texture turns with it, which reads as the smoke curling. The puffs are placed from a seeded hash, so no script runs while it drifts. It follows your theme: pale smoke over a dark page, charcoal over a light one.
Use it for a dramatic hero, an event or music page, or a section that should feel atmospheric. For flat horizontal mist, use Fog; for the fire under the smoke, Fireplace; for coloured clouds with stars, Nebula; for soft colour washes that stay put on paper, Watercolor.
Installation
Usage
import { Smoke } from "@/components/ui/smoke";The smoke rises behind whatever you put inside, over the whole box. Give the container a height; for the whole page, render it empty with className="fixed inset-0 -z-10".
<Smoke className="flex min-h-[420px] items-center justify-center">
<h1 className="text-4xl font-semibold">Into thin air</h1>
</Smoke>Demos
In a breeze
wind={0.6} leans every plume to the right and speed={1.4} makes it rise faster, here in a small card. wind goes from -1 (left) to 1 (right).
Stage smoke
smokeColor takes any CSS colour; here violet, with intensity="strong" for thick smoke. The container has the dark class, so the smoke glows on a dark stage in either theme.
Accessibility
The smoke 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 puff stops where it is, so the stage stays smoky as a still picture. Nothing flashes.
Put copy over it in your foreground colour (text-foreground). At the default intensity a headline stays readable in both themes; behind body text, use intensity="subtle". wind is a physical direction, so it isn't mirrored on right-to-left pages.
FAQ
How dense is it?
count sets how many puffs rise at once (14 by default, up to 24) and intensity how opaque they get: subtle, medium or strong.
Can it blow sideways?
Yes. wind from -1 to 1 leans every plume left or right, and speed sets how fast they rise: 2 is twice as fast, 0.5 half as fast.
How do I colour it?
Pass any CSS colour to smokeColor, or set --smoke-color in your CSS. By default it's your foreground colour mixed 70% toward the background, so it fits light and dark themes.
Is it heavy?
No script runs per frame: the puffs move with transform and opacity, which the browser composites without repainting, and each rises three times per animation cycle, so the page is barely woken. Each puff is a large texture on the GPU (about 4 MB on a 2× screen), so on a phone keep count under 10.
API Reference
Smoke
<div> data-slot="smoke"
count?number
How many puffs rise at once, from 0 to 24. Each is a large texture on the GPU: keep it under 10 on a phone.
- Default
14
intensity?"subtle" | "medium" | "strong"
How thick the smoke gets: subtle behind body text, strong for a
stage.
- Type
"subtle" | "medium" | "strong"- Default
"medium"
smokeColor?string
The smoke's colour, any CSS colour.
- Default
your foreground colour, 70% toward the background
speed?number
How fast the smoke rises: 2 is twice as fast, 0.5 half as fast.
- Default
1
wind?number
Leans every plume sideways, from -1 (left) to 1 (right). It's a physical direction, the same on right-to-left pages.
- Default
0
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.
--smoke-colorstring
The smoke's colour (the foreground, 70% toward the background).
--smoke-speedstring
How fast it rises, a multiplier (1).
--smoke-strengthstring
How opaque it gets, a multiplier (1).
--smoke-windstring
How far the plumes lean, from -1 to 1 (0).
Related


Fog Background
WeatherFlat horizontal mist, for a calmer wash
- Pro


Fireplace Background
WeatherThe fire under the smoke
- Pro


Nebula Background
SpaceColoured clouds with stars
- Pro


Ink Background
GradientsPigment blooming in water, darker and denser
- Pro


Tornado Background
WeatherA storm funnel that spins instead of rising
- Pro


Watercolor Background
GradientsSoft watercolour washes on paper