CodeBlock
Code samples with a language label and a working copy button. No highlighter dependency: structure first, color later.
Example
npm install astro-ink<CodeBlock language="bash" code="npm install astro-ink" />Props
| Prop | Type | Default | Description |
|---|---|---|---|
code | string | - | Source text (required). |
language | string | text | Label shown in the bar. |
Accessibility
- Copy feeds the real clipboard and confirms via the button label.
- Long lines scroll inside the block; the page never overflows.