Skip to content
Playground

Prose

Semantic-token typography for articles, rendered Markdown, CMS content, and rich text.

Prose gives bare document elements a consistent reading measure, type hierarchy, spacing rhythm, and semantic color treatment. Wrap rendered Markdown, trusted CMS output, or plain JSX without adding classes to every heading, list, quote, code block, or table.

TSX
import { Prose } from "@zentara-co/zenos-ui";

Use as when the wrapper has document meaning. Zenos layout polymorphism uses as, so an article or section keeps its native props and ref type.

TSX
<Prose as="article" size="lg">  <h1>Release notes</h1>  <p>Version 2.4 improves form density and keyboard behavior.</p></Prose>

The size changes body type, heading hierarchy, and block spacing as one reading system. The defaults follow a 14/24 body with a 16px block step at sm, 16/28 with a 20px step at md, and 17/28 with a 24px step at lg. Use sm for compact product descriptions and stored editor output, md for documentation and release notes, and lg for long-form articles.

Prose styles bare headings, paragraphs, emphasis, links, ordered and unordered lists, blockquotes, inline code, preformatted blocks, tables, images, figures, descriptions, keyboard input, and separators. Its default reading measure is 42rem, the wrapper starts with no padding, and wide tables scroll inside that measure instead of expanding the page.

Elements that already carry a className keep their own component treatment. This lets Link, Button, CodeBlock, and other Zenos components sit inside Prose without being restyled as bare document content.

TSX
<Prose>  <p>    A bare <a href="/guide">document link</a> receives the prose treatment.  </p>  <Link href="/workspace">Open workspace</Link></Prose>

className is merged after the defaults, so ordinary utilities can replace the reading measure and wrapper padding. Use the typed --prose-* variables through style when descendant rhythm or padding needs to change without rewriting the selectors.

TSX
<Prose  className="max-w-none p-6"  style={{    "--prose-block-gap": "2rem",    "--prose-list-indent": "2rem",    "--prose-pre-padding": "1.5rem",  }}>  {content}</Prose>

Available spacing variables are --prose-block-gap, --prose-media-gap, --prose-list-indent, --prose-quote-padding, --prose-pre-padding, --prose-inline-code-padding-inline, --prose-inline-code-padding-block, --prose-cell-padding-inline, and --prose-cell-padding-block.

Prose only styles descendants; it does not parse or sanitize HTML. Sanitize untrusted CMS or user-authored HTML before passing it to React.

TSX
<Prose dangerouslySetInnerHTML={{ __html: sanitizedHtml }} />

Sizes

smmdlg
Prose

API

PropTypeDefaultDescription
size sm | md | lg md Selects the body type scale, heading scale, and vertical rhythm together.
as ElementType div Renders a semantic wrapper such as article or section.
className string — Extends the wrapper and descendant treatment with consumer-owned classes.
style ProseStyle — Overrides native wrapper styles and the documented --prose-* spacing variables.
native props React.HTMLAttributes<HTMLElement> — Forwards native attributes, events, aria-*, data-*, className, style, and ref.

Unless narrowed above, each DOM-rendering part also accepts its underlying native or Base UI props, including className, style, aria-*, and data-*.

Use meaningful document structure inside Prose: keep heading levels ordered, give links descriptive text, include alternate text for informative images, and add table headers and captions where they help readers. Choose as="article" or as="section" only when that landmark has an accessible purpose. Prose changes presentation without replacing native semantics.