Skip to main content

Code

Code component is the used to render pre or code block.

import { Code } from "rizzui";

Default

The default style of the Code.

<html> 
  <head>
    <title>Welcome to RizzUI.</title>
  </head>
  <body>
    <h1>RizzUI Wesbite</h1>
    <h2>My first page.</h2>
    <p>
      RizzUI is a free open source react ui library.
    <p>
  </body>
</html>
import { Code } from "rizzui";

export default function App() {
return (
<Code>
&lt;html&gt; <br />
&nbsp;&nbsp;&lt;head&gt; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;Welcome to RizzUI.&lt;/title&gt;{" "}
<br />
&nbsp;&nbsp;&lt;/head&gt; <br />
&nbsp;&nbsp;&lt;body&gt; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;h1&gt;RizzUI Wesbite&lt;/h1&gt; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2&gt;My first page.&lt;/h2&gt; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RizzUI is a free open source react ui
library. <br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt; <br />
&nbsp;&nbsp;&lt;/body&gt; <br />
&lt;/html&gt;
</Code>
);
}

API Reference


Code Props

Here is the API documentation of the Code component.

PropsTypeDescriptionDefault
classNamestringAdd custom classes for extra style__