PretextOnline
HomeGuideAPIDemosCaveats
Language中文

Live demos

Embedded examples you can tweak here, plus external demos that open in a new tab.

  • Pretext Breaker

    Pretext Breaker

    Breakout-style game: the text wall recomposes as the ball and paddle collide—dynamic layout with Pretext.

    Open in new tab →
  • Illustrated Manuscript

    Illustrated Manuscript

    Parchment-like page with blackletter type and an ornate drop cap—interactive narrative by Neither/Nor (e.g. click for fire).

    Open in new tab →
  • Height & line count

    prepare + layout: change width and line-height, read total height and line count.

    Open demo →
  • Line list

    layoutWithLines: each line’s text and measured width.

    Open demo →
  • pre-wrap

    Preserve spaces, tabs, and hard breaks.

    Open demo →
  • Varying line widths

    layoutNextLine: first lines narrow, then full width—simple float-style flow.

    Open demo →

pretextonline

This site is an independent community guide and demo collection—not an official Pretext site. Library by Cheng Lou, MIT licensed.

  • GitHub: chenglou/pretext
  • npm: @chenglou/pretext

Resources

  • pretext-builder (community docs & Cursor skill)

© 2026 pretextonline