Code block
<CodeBlock> controls a code block's title, highlighting, focus, line numbers and collapsing with props.
Most of the time a plain fenced code block is all you need; for meta syntax (titles, line highlighting, focus, max lines…) see Code blocks.
Uses props instead of fence meta — handy when there are many options or you need links:
<CodeBlock title="client.ts" highlight="2" maxLines={0} links={{ "createClient": "/api-reference", "/get\\w+/": "/api-reference" }}>
```ts
import { createClient } from "@acme/sdk";
const client = createClient({ apiKey: process.env.ACME_KEY });
const me = await client.getMe();
```
</CodeBlock>import { createClient } from "@acme/sdk";
const client = createClient({ apiKey: process.env.ACME_KEY });
const me = await client.getMe();