Usage
By default, Code component renders inline code
html element:
React.createElement()
Block code
To render code in pre
element pass block
prop to Code component:
import React from 'react'; import { Code } from '@mantine/core'; function Demo() { return <Code>React.createElement()</Code>; }
Custom color
By default, code color is gray, you can change it to any valid CSS color or to one of the theme.colors:
React.createElement()
React.createElement()