Prose

Wrapper that styles raw descendant HTML — headings, lists, code, quotes, tables

Category: display · WCAG 2.2-AA · typography, prose, content, markdown, article

Props

PropTypeDefaultDescription
childrenReact.ReactNodeAuthored flow content (headings, paragraphs, lists, code, tables) to style.
dangerouslySetInnerHTML{ __html: string }Rendered HTML you do not control (CMS, markdown pipelines). Sanitize first.
classNamestringAdditional CSS class names merged onto the root element.

Design tokens

When to use

When not to use

How to build an accessible Prose in React →

Examples

Authored content

<Prose><h2>Install</h2><p>Run <code>npx cascivo init</code>.</p></Prose>

Rendered markdown

The use case: HTML you do not control (CMS, markdown pipelines)

<Prose dangerouslySetInnerHTML={{ __html: html }} />

Related components

← Back to docs