CodeBlock
Syntax-highlighted code block — prism-react-renderer with Twenty-coloured theme. Copy button included.
Use CodeBlock to display source, configuration, or shell commands. Syntax colours come from --t-code-text-* and --t-font-color-* — light/dark switches automatically.
Install
Pull from the workspace packages (already available if you ran pnpm add):
Examples
TypeScript + bash
Guidelines
✓
Specify the language for accurate tokenising.Without it prism falls back to plain text — keywords don't colour.
✓
Use filename to disambiguate one of several snippets.The chrome bar is also where the copy button lives.