Content Components
<Markdown>, <Code>, <Diff>, <Spinner> and <AsciiFont>.
These components render Markdown, code, diffs and large lettering on the cell grid.
<Markdown>
Streaming-safe Markdown. Pass a growing string and the frame stays stable.
Liver stream againtsx
const [text, setText] = useState("");useEffect(() => stream.on("token", (t) => setText((s) => s + t)), []);return <Markdown>{text}</Markdown>;<Code>
Syntax highlighting for ts, tsx, json, bash, python, rust, go and more.
<Code code={source} language="tsx" showLineNumbers maxHeight={12} />| Prop | Description |
|---|---|
language | Language id |
showLineNumbers | Line gutter |
highlightLines | Lines to tint |
maxHeight | Clip with a "more lines" footer |
<Diff>
Unified diffs, or computed from { before, after }.
Live72×12 · booting Turbolog…tsx
<Diff patch={{ before, after, filename: "app/page.tsx" }} /><Spinner>
Variants: dots, pulse, matrix and line. Timers stop while paused.
<Spinner variant="dots" label="Building…" /><AsciiFont>
Big pixel lettering for headers.
Live64×11 · booting Turbolog…tsx
<AsciiFont text="▼ TEXT.JS" color="accent" />Use font="compact" for a 3-row variant. Pass a FIGlet font from @textjs/font, like font={slant}, for figlet lettering.