FIG-001 · MASTHEAD

svelte/virtual chat.

A high-performance virtual chat viewport for Svelte 5 — purpose-built for LLM conversations, support chat, and any message-based UI. Only visible messages hit the DOM, with follow-bottom, in-frame streaming correction, and history prepend that never jumps the scroll.

get started ↗ api reference examples
FIG-001
SHEET 01 / 06
dom nodes
~20
at 10,000 messages
messages
10k+
still smooth
tarball
38.6kB
packed (npm gz)
dependencies
1
micro dep · esm-env
streaming
1frame
correction, before paint
licence
MIT
on GitHub
FIG-002 / STREAMING

stream ai responses in real-time.

A live SvelteVirtualChat instance. Assistant replies stream in token-by-token while the viewport stays pinned to bottom — corrected in the same frame the height grows, before paint.

file · live-chat.svelte dom —/0 tokens 0/— ○ IDLE
FIG-003 / CAPABILITIES

built for chat, not lists.

Every feature is a direct response to a real problem in chat UI development.

№ 01 / 06

Follow-Bottom

Viewport stays pinned to the newest message. Scroll away and it stops. Return and it resumes.

№ 02 / 06

LLM Streaming

Height changes from token streaming are batched per frame. No jitter, no jumps, no workarounds.

№ 03 / 06

Virtualized

Only visible messages exist in the DOM. 10,000 messages renders ~20 DOM nodes.

№ 04 / 06

History Prepend

Load older messages at the top. Scroll anchor preservation keeps the user's position stable.

№ 05 / 06

Message-Aware

Uses message IDs for identity. Height caching, scroll-to-message, and keyed rendering built in.

№ 06 / 06

Svelte 5 + TypeScript

Full generics, runes ($state, $derived, $effect), and snippets. One micro-dependency (esm-env).

FIG-004 / PLAYGROUND

live playground.

Type a message and send it. Watch follow-bottom re-engage and the virtualization stats update as the conversation grows.

file · playground.svelte messages 1 dom —/0 ● FOLLOWING
assistant
Welcome! Type a message below and watch follow-bottom and the virtualization stats react in real time.
// virtualization
total 1
in dom
measured
range
follow bottom
FIG-005 / AI-READY

built for ai-assisted code.

Point Cursor, Claude Code, or any LLM at the manifests below and they know the full svelte-virtual-chat API — every prop, the debug-info schema, follow-bottom and streaming semantics, and history-prepend anchoring.

FIG-006 / EXAMPLES

explore interactive examples.

See basic chat, LLM streaming, history loading, and persistent header / footer snippets — all self-contained live demos with copyable source.

view all examples →
SET / JETBRAINS MONO + INTER
HUMANSPEAK · 2026
MIT LICENCE
● 0.1.20
SHEET 06 / 06
END OF DOCUMENT
↩ TO TOP