Skip to content

CodeBlock

Code samples with a language label and a working copy button. No highlighter dependency: structure first, color later.

Example

bash
npm install astro-ink
<CodeBlock language="bash" code="npm install astro-ink" />

Props

PropTypeDefaultDescription
codestring-Source text (required).
languagestringtextLabel shown in the bar.

Accessibility