CodeBlock
Code of more than one line in Fira Code, such as tool call arguments, config snippets, SQL the agent ran or install commands.
When to use
Section titled “When to use”- Use it for any code longer than one line. Inline identifiers use the
codestyle fromKbd.
What the consumer provides
Section titled “What the consumer provides”codeandlanguage. The header shows the language mark and the language name in words: “Go”, “TypeScript”, “Bash”, “SQL”. An optionalfileNamefollows the name.copy(on by default).lineNumbersfor more than five lines. OptionalhighlightLines.
Behaviour
Section titled “Behaviour”surface-200withborderandradius-lg. The header is 36px. It holds the language mark at 16px, the language name inink-secondary, and asubtle smCopy button that reads “Copied” for 2 s. The Copy button points to the language name witharia-describedby, so a screen reader hears which block it copies.- The language mark comes from
@upmo-ai/brands(languages, files inassets/languages). It isaria-hiddenand always sits next to the language name. It is never shown alone, and never anywhere else on the page. This is the one place outside pickers and connector rows where a third-party mark may appear. - A language with no mark (Java, SQL, plain text, diff and any other) shows the Tabler
file-codeoutline icon incurrentColorin the same 16px slot. JSON shows the Tablerbracesicon, the{ }people know. The header keeps the same shape for every language. - Marks with a black published colour (Markdown, Rust) draw in
currentColor, so they follow the theme. See the Languages page for the rules. - Long lines scroll sideways inside the block. Code never wraps. Line numbers are
ink-disabledand cannot be selected. - There are four token colours only. Keywords are
emerald-deep, stringswarning, numbersinfo, and commentsink-muteditalic. All of them meet 4.5:1 onsurface-200in both themes.
Tokens
Section titled “Tokens”surface-200, border, radius-lg, ink, ink-secondary, ink-muted, ink-disabled, emerald-deep, warning, info.
Mantine
Section titled “Mantine”@mantine/code-highlight: <CodeHighlight code language withCopyButton={false} radius="lg" /> under a header you render yourself (mark, name, Copy). Use a Shiki or highlight.js adapter mapped to the four token colours.