CodeBlock
Multi-line code with an optional language label (display only — no syntax highlighting) and a copy-to-clipboard button.
ts
import { Button } from '@gg-software/ui';
export const Save = () => <Button variant="primary">Save</Button>;import { CodeBlock } from '@gg-software/ui';
<CodeBlock
language="ts"
code={`import { Button } from '@gg-software/ui';
export const Save = () => <Button variant="primary">Save</Button>;`}
/>;Props
| Prop | Type | Default | Description |
|---|---|---|---|
code* | string | — | |
language | string | — | language label shown top-left (display only) |
showCopy | boolean | true | |
className | string | — |
* required · generated from packages/ui/src/typography/CodeBlock/CodeBlock.tsx