Skip to main content

Hypertext

The Hypertext component parses rich text formatted as markdown or HTML to render the proper DOM elements. The Text component is a wrapper for the Hypertext component; either can be used with the same result.

Examples​

Markdown​

When 'markdown' is passed in as the format type, the raw markdown will be sanitized and parsed into HTML element(s). This simple example shows how the Hypertext component can be used to render <h3>h3 header</h3>

h3 header

HTML​

When 'html' is passed in as the format type, the raw HTML will be sanitized and parsed into JSX element(s).

h3 header

paragraph

Props​

PropertyDescriptionType
textThe textString
formatThe format of the textString Enum of 'markdown' or 'html'