Typography
Terminal-styled typography wrapper for consistent text styling. Provides variants for body text, prose content, and compact displays, plus semantic h1-h6 headings with sensible default sizing.
Installation
dgadd is not public on npm yet. Until the first release, pack @diffgazer/add from the repository and install that tarball into this app, which is what puts dgadd on pnpm exec.
The hosted registry is not public yet because r.b4r7.dev does not resolve. Use this source checkout or a local registry preview until the endpoint returns 200.
Diffgazer packages are not yet published to npm. Until the first release, pack @diffgazer/ui and @diffgazer/keys from the repository and install those tarballs.
UI components require Tailwind CSS v4. Local copy mode imports src/styles/styles.css; package mode uses @diffgazer/ui CSS once packages are available.
Usage
Semantic headings
Pass as="h1" through as="h6" to render semantic heading elements. Each level
ships with a sensible default size; pass an explicit size prop to override.
SectionHeader remains the right primitive for the small, uppercase, tracked
section labels common throughout the product surface; reach for Typography
when you need general semantic headings outside that pattern.
Weights and colors
weight and color are independent axes on every size. color="accent" reads
the theme accent token, so it stays a deliberate highlight in both palettes.
API Reference
Typography
Accessibility
Notes
Variants
Use 'default' for general UI text, 'prose' for longer-form content with wider line-height, and 'compact' for dense secondary information.
Semantic Elements
Use the 'as' prop to render the appropriate HTML element: 'p' for paragraphs, 'span' for inline text, 'div' for block content, and 'h1'-'h6' for semantic headings. Defaults to 'div'.
Heading Defaults
Each heading level has a default size (h1 = 3xl, h2 = 2xl, h3 = xl, h4 = lg, h5 = base, h6 = sm) and auto-defaults to bold weight. Pass explicit 'size' or 'weight' props to override.
Heading Semantics
Only 'as' decides the document outline: 'size' is purely visual and never changes the rendered element. Pick the heading level that follows the surrounding outline, then set 'size' to match the visual hierarchy — never pick 'as' to obtain a size.
Source
Install via CLI: pnpm exec dgadd add ui/typography.
Highlighted source loads after this disclosure opens. Browse the source repository.