Pre

Displays preformatted and typically multiline text.

It implements the <pre> element.

Typically used with a <code> element child.

Styles

Import the styles within a Next.js custom app in pages/_app.js.
import "device-agnostic-ui/Pre.css";

Props

Use any valid <pre> props.

Examples

How to import.
import Pre from "device-agnostic-ui/Pre.mjs";
Multiline HTML code block.
import Code from "device-agnostic-ui/Code.mjs";
import Pre from "device-agnostic-ui/Pre.mjs";

const result = (
  <Pre>
    <Code>{`<section>
  <h1>Header</h1>
</section>`}</Code>
  </Pre>
);
<section>
  <h1>Header</h1>
</section>

Tags