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