new ScreenJSONUI(...), auto-mounted
from a CDN script tag, or used as a Svelte component — supports the same
option set.
ScreenJSONUIConfig
Theme
config.themelocalStorage['screenjson-theme']prefers-color-scheme'light'(final fallback)
Lang
A BCP 47 language tag string — en, en-GB, fr-CA, ja, zh-Hant,
sr-Latn-RS. The viewer’s language picker only appears when the
document declares more than one.
Auto-fit zoom
The viewer measures its container width and shrinks the paper to fit when the viewport is narrower than the natural 8.5″ page. Yourzoom
config is a multiplier on top of that fit:
zoom in 10% steps.
CSS variables
Every visual token is a CSS custom property declared on:root (or on
html.dark for the dark variant). Override any of them in your own
stylesheet to re-theme:
app.css.
Formatting constants
The viewer also exports formatting constants fromscreenjson-ui/dist/... if you want to reuse them in your own
calculations: