HomePaymentsNo-codeDevelopersContribute
Safepay Home PageLive DashboardTest Dashboard

Pre


The PRE component is used to render preformatted text blocks, typically used to display code or formatted data in a way that maintains spacing and line breaks as it is in the source.

Usage

PRE Component Usage
import React from 'react';
import { PRE } from '~/ui/components/Text';

export default function App() {
  return (
    <div>
      <PRE>
        function hello() {'{\n'}
          console.log("Hello, world!");{'\n'}
        {'}'}
      </PRE>
    </div>
  );
}

Rendered Example

function hello() { console.log("Hello, world!") }

Props

The PRE component accepts all standard HTML preformatted text attributes, allowing for wide customization in how preformatted text is displayed.