Ember Glow
An animated fire-and-smoke glow that rises from the bottom of a footer or section.
Preview
How far up the fire reaches.
Default: 0.4Min: 0.1Max: 0.9
Brightness of the flames.
Default: 1Min: 0.3Max: 2
How fast the smoke rises.
Default: 1×Min: 0×Max: 3×
Leans the flames left or right.
Default: 0Min: -1Max: 1
Where the fire burns tallest.
Default: 50%Min: 0%Max: 100%
Even wall at 0, a single plume at 1.
Default: 0Min: 0Max: 1
Setup
Install with the shadcn CLI
One command adds every file, the npm packages and any Kinetik components it builds on. Needs a components.json; the CLI offers to create one if your project has none.
Or install manually
- 1
Run in your terminal:
$npm install clsx tailwind-merge - 2
Copy
lib/utils.tsfrom the Code tab. Skip if you already havecn(). - 3
Create a
components/ui/ember-glow/folder and copy every file from the Code tab into it. Each file does one job, so you can read or change a piece without the rest. - 4
Import and render:
Exampleimport EmberGlow from "@/components/ui/ember-glow" <footer className="relative isolate h-screen"> <EmberGlow className="absolute inset-0 -z-10" /> {/* footer content */} </footer>
Usage
EmberGlow fills its parent. Put it behind your content in a positioned container.
import EmberGlow from "@/components/ui/ember-glow"
export function Footer() {
return (
<footer className="relative isolate h-screen bg-[#0a0a0a] text-white">
<EmberGlow className="absolute inset-0 -z-10" height={0.35} />
<h2 className="absolute inset-x-0 bottom-8 text-center text-[12vw]">LET'S CONNECT</h2>
</footer>
)
}To make the fire taller on one side, set peak to where it should be tallest and
raise focus. wind leans the flames and carries the smoke sideways.
<EmberGlow peak={0.8} focus={0.7} wind={-0.4} />It is a single WebGL fragment shader with no dependencies. Smoke is domain-warped noise scrolling upwards, and the noise height maps through four colour stops.
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
colors | [string, string, string, string] | fire | From the smoke's dark edge to the hot core at the bottom. |
background | string | "#0a0a0a" | Colour above the fire. |
height | number | 0.32 | How far up the fire reaches, as a fraction of the height. |
speed | number | 1 | How fast the smoke rises. 0 freezes it. |
intensity | number | 1 | Brightness of the fire. |
grain | number | 0.05 | Film grain strength. 0 turns it off. |
peak | number | 0.5 | Where along the bottom the fire burns tallest: 0 left edge, 1 right edge. |
focus | number | 0 | How much the fire gathers at peak: 0 an even wall, 1 a single tall plume. |
wind | number | 0 | Sideways wind from -1 (left) to 1 (right). The flames lean and drift with it. |
Accessibility
- The canvas is decorative:
aria-hiddenandpointer-events: none - With
prefers-reduced-motion, the smoke stays still - It only animates while on screen and while the tab is visible