Skip to main content
01 / Layout. Edit. Render.

You build the interface.
Twip handles the page.

A DOCX layout, editing and rendering engine for document experiences that don’t fit inside a word processor. Twip owns the page; your application owns everything around it.

02 / Division of labor

Two sides of the caret.

Twip is the engine under an editor, not the whole application. It computes the models behind the chrome, and you draw the chrome.

TWIP / THE PAGE
Layout
Line for line and page for page, the way a word processor lays a document out.
Caret and selection
Hit testing, keyboard and pointer input, and the accessibility DOM.
Editing
Commands, undo and redo, tracked changes and comments on the document model.
Drawing
Its own 2D engine, twip-graphics: a CPU reference, the GPU through wgpu, and PDF.
YOUR APPLICATION / THE INTERFACE
Toolbar
Formatting state for every control, recomputed as the selection moves.
Menus and dialogs
Context menus, find and replace, spelling, and font and paragraph dialogs as models.
Panes and rulers
Review balloons, rulers and navigation, ready for your own components.
Your product
The workflow around the page: forms, approvals, templates, whatever it needs to be.
03 / Integrations

One engine, three integrations.

Each SDK is written by hand for its language. A shared suite of contract scripts runs against all of them, so they behave the same.

04 / Pipeline

From DOCX to pixels.

Fragments are immutable and positionless. After an edit, layout restarts from the page before the change and reuses every page after it once they match.

  1. 01DOCX
  2. 02Document model
  3. 03Layout
  4. 04Page fragments
  5. 05Drawing
  6. 06twip-graphics
Architecture and performance ↗
05 / Status

Early, and honest about it.

Twip is in its initial development phase (0.x). The API will change between minor versions until 1.0.