On this page

Typography

Prose

Type, spacing, and element styles for long-form HTML content.

Prose styles long-form content written as plain HTML, such as rendered Markdown or CMS output. Write headings, paragraphs, lists, code blocks, and tables as native elements. Headings and paragraphs get the same type styles as Heading and Text. Prose spaces the blocks and does not set a content width.

Prose: Basic
Loading Prose: Basic example

Native elements

Native links, inline code, keyboard input, and blockquotes use the default visual treatments of Link, Code, Kbd, and Blockquote. Links use the browser's hover, pressed, and keyboard focus states. Inline code wraps, including long unbroken tokens. Code inside pre keeps its whitespace and scrolls with the block.

Use the dedicated components or their recipes when you need their props or variants. They keep their own appearance inside Prose.

Prose: Native elements
Loading Prose: Native elements example

Heading and Text

Use Heading or Text for an element that needs a prop, such as a different type style or colour. They keep their own props inside Prose, and Prose still spaces them.

Prose: Heading and Text
Loading Prose: Heading and Text example

Lists

Lists get markers and indentation at every nesting level. Untyped ordered lists use decimal markers. A typed list, such as <ol type="a">, keeps its HTML markers, except in Chromium under a reset that removes list markers, such as Tailwind Preflight.

Prose: Lists
Loading Prose: Lists example

Wide content

Images and videos shrink to fit the content width. A code block or table wider than the content scrolls sideways inside its own box. A table that fits takes the width of its content.

When you control the markup, set tabIndex={0} on a pre or table so someone using a keyboard can scroll it in every browser.

Prose: Wide content
Loading Prose: Wide content example

Opting out

Add the not-prose class to an element to keep Prose styles off it and everything inside it. Use it for an interactive widget or a component that sets its own layout. A Prose nested inside that element applies again.

<Prose>
	<p>Spaced like the rest of the content.</p>
	<div className="not-prose">
		<p>No Prose margins here.</p>
	</div>
</Prose>

The element still keeps the gap that Prose puts after a heading or rule.

Browser support

Prose uses CSS @scope, which needs Chrome 118, Safari 17.4, or Firefox 146. Older browsers show the content without Prose styles.

API

ProseProps also accepts compatible DOM and ARIA attributes and event handlers for its rendered element.

NameType