For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. The asciicn agent skill, for building any ASCII effect on the engine, is at /.well-known/agent-skills/asciicn/SKILL.md.

Ember

A low, slow fire in glyphs: flames rise from the bottom edge and break into smoke, while single sparks drift up on the wind.

Controls
Charset
Colour mode
Intensity1
Wind0.2
Sparks0.5
Speed1×
Cell12px

Installation

pnpm dlx shadcn@latest add https://asciicn.dev/r/ember.json

Usage

import { Ember } from "@/components/asciicn/ember";
 
export function Hero() {
  return (
    <section className="relative isolate min-h-[480px]">
      <Ember intensity={0.6} className="absolute inset-0 -z-10" />
      <h1>Your headline</h1>
    </section>
  );
}

Tongues of flame rise from the bottom edge. Each one has its own height that rises and falls over several seconds, licks run up through it, and its edges fray. Near the tip, pieces tear off and the tongue carries on as a faint plume of smoke. A few sparks leave the flames, drift sideways on the wind, blink and go out. Just above the tongues, the rows waver a little, like air over a fire.

Every size is measured against the height of the flames, so the same fire works as a band along the bottom of a hero and as a box filled with fire. intensity sets that height: at 1 the tallest tongues reach about half the box, at 0.6 they stay in the lower third, and at 1.5 or more they fill a short strip.

In truecolor the coolest glyphs are a deep coal red, the body takes the flame colour, and the hottest glyphs mix toward the ink: pale gold on dark paper, deep copper on light paper. Smoke is the ink faded toward the paper. In palette mode the glyphs run paper, ink, flame by tone, so the hottest glyphs are the amber and the smoke fades into the paper.

It draws in standard by default. braille gives fine dots, and quadrants a blockier fire; both use blue-noise dithering so the smoke and the tips break into scattered dots.

Examples

An intensity of 0.6 keeps the fire in the lower third, so the headline sits on clear paper.

Card strip

A short strip along the bottom of a card. A high intensity fills the strip.

Braille

Eight dots per glyph, for a finer fire.

Props

PropTypeDefault
intensity

How tall the flames reach, from 0 (none) to 2. At 1 the tallest tongues reach about half the box.

Type: numberDefault 1
wind

Sideways wind, from -1 (to the left) to 1 (to the right). It leans the flames and carries the sparks and smoke.

Type: numberDefault 0.2
sparks

How many sparks rise, from 0 (none) to 1.

Type: numberDefault 0.5
flame

The flames in truecolor, the hottest glyphs in palette mode and every glyph in mono.

Type: AsciiColorDefault "orange"
ink

The smoke, the cooler glyphs in palette mode, and what the flame's core mixes toward.

Type: AsciiColorDefault "--ascii-ink"
paper

The surface behind the glyphs. Smoke fades toward it.

Type: AsciiColorDefault "--ascii-paper"
charset

Which glyphs draw the tones. See Charsets.

Type: CharsetNameDefault "standard"
chars

A custom ramp from empty to dense, such as " .oO@". Wins over charset.

Type: stringDefault –
colorMode

How glyphs are coloured. truecolor runs from coal red through the flame colour to a pale core; palette runs paper, ink, flame by tone; mono draws every glyph in the flame colour.

Type: "mono" | "truecolor" | "ansi16" | "duotone" | "palette"Default "truecolor"
phosphor

In mono mode, a CRT ink and glass that replace ink and paper.

Type: "p1" | "p3" | "ibm" | "blueprint"Default –
ramp

In duotone mode, the colour ramp from dark to light.

Type: RampName | string[]Default –
ansi

In ansi16 mode, which 16-colour table.

Type: "vga" | "xterm"Default "vga"
grade

Brightness, contrast, gamma and saturation applied to tones before glyphs are picked.

Type: GradeDefault –
invert

Dense glyphs for dark tones instead of bright ones.

Type: booleanDefault false
threshold

Braille and quadrants: the tone that lights a dot.

Type: numberDefault 0.5
edgeThreshold

Edge charset: how strong a change in tone must be to draw - / | or \.

Type: numberDefault 0.22
dither

Ordered dithering between neighbouring glyph levels.

Type: "none" | "bayer2" | "bayer4" | "bayer8" | "blue-noise"Default "blue-noise" for braille and quadrants, else "none"
background

"transparent" draws the glyphs only, over your own surface.

Type: "paper" | "transparent"Default "paper"
fx

CRT finish: scanlines, bloom, curvature, glitch, flicker and vignette, each 0 to 1.

Type: PostFxDefault –
cell

Height of one glyph cell in CSS pixels.

Type: numberDefault 12
speed

How fast it moves.

Type: numberDefault 1
animate

false stops the motion: a still frame if it starts off, the current frame if it was moving.

Type: booleanDefault true
fps

Frame rate cap.

Type: numberDefault 30
stillTime

The moment drawn when motion is off or reduced, in seconds.

Type: numberDefault 12
handle

Filled with a handle that reads back the current frame, for export to text, ANSI, SVG or PNG.

Type: RefObject<AsciiHandle | null>Default –
fallback

Shown without WebGL and until the first frame.

Type: ReactNodeDefault A soft glow in the flame colour
className

Size and position. The background fills this box.

Type: stringDefault –

Notes

  • It is decorative and hidden from assistive technology. Put real text on top of it, not inside it.
  • With reduced motion turned on, it draws one still frame at stillTime and stops.
  • It does not react to the pointer.
  • It pauses when scrolled out of view or when the tab is hidden, and releases its WebGL context when far offscreen. Without WebGL it shows a soft glow in the flame colour along the bottom.
  • speed scales all of the motion together: the flames, the smoke and the sparks.