ZUI

Search documentation

Find a page or a heading.

Font Preview

A specimen of a font file at several sizes, one row per size, loaded through an @font-face scoped to the instance.

tsx

Installation

bash

Usage

tsx
tsx

The consumer places and pads its wrapper; it renders one row per size, largest first. Use it to compare a font file's weights before shipping it; for a previewed image rather than type, use Image Preview.

API reference

FontPreview

Renders a div and takes every prop a div takes, plus:

format is derived from src's extension when omitted. It scopes a unique @font-face to the instance, so several previews on one page never collide, and sets data-slot="font-preview".