Code Block

A Shiki-highlighted code block with light and dark rendering and a copy button.

$bunx shadcn@latest add @nx-ui/ai-code-block
Registry item
Installs withbuttonutils
Used byai-tool

With copy button

Shiki highlights the snippet — a separate theme is rendered for light and dark mode — and the copy button sits in the top corner.

With line numbers

Set `showLineNumbers` to prefix each line with its number via a Shiki transformer.

Other languages

Any Shiki bundled language works — here a shell snippet.