Primer

Prose

Use the prose component to apply Primer Brand styles to HTML markup.
import {Prose} from '@primer/react-brand'

Examples

The Prose component renders native HTML elements with Primer Brand styling. Prose doesn't sanitize the input data. We recommend sanitizing the data before passing it into Prose.

Prose currently supports styling the following HTML elements: <h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <p>, <strong>, <em>, <a>, <ul>, <ol>, <li>, <img>, <blockquote>, <code>, <figure>, <figcaption> and <div>.

Default

Full Width

Component props

Prose

NameTypeDefaultRequiredDescription
htmlstringtrueContent to be displayed within the Prose component
enableFullWidthbooleanfalseA toggle to remove the default max-width
classNamestringSets a custom class on the root element