Skip to main content
CodeBlock, the base fenced-code surface from smthrs/ui, uses the shared --code-bg and --code-text theme tokens and ships no syntax-highlighting dependency.
The copy button uses onCopyCode when provided, else falls back to navigator.clipboard, and hides when neither is available. A highlighter returns readonly { text, color? } token lines; returning null or throwing renders escaped plain text.

Props