<!-- Auto-generated by `velinstyle docs generate`. Do not edit. Source: components/velin-code-block.js -->

# <velin-code-block>

Source: `components/velin-code-block.js`

## Minimal working example
Copy-paste starter (load CSS + `velinstyle-components` / `bootFromDOM` as needed):

```html
<velin-code-block language="js" line-numbers>
const greet = (name) => `Hello, ${name}!`;
console.log(greet('Velin'));
            </velin-code-block>
```

_Example derived from human component docs (`exampleSource: human-doc`; fail-closed extract — not a second SoT)._

## Accessibility
WCAG contract status: **pass** (framework target: AAA).

- **Roles:** `button`
- **Keyboard:** Expand toggle keyboard
- **Notes:** Expand uses aria-expanded and aria-controls.

## Attributes
| Attribute | Notes |
| --- | --- |
| `language` | Observed — triggers `attributeChangedCallback` when changed |
| `highlight` | Observed — triggers `attributeChangedCallback` when changed |
| `line-numbers` | Observed — triggers `attributeChangedCallback` when changed |
| `collapsed` | Observed — triggers `attributeChangedCallback` when changed |
## Events
_None._
## CSS parts
_None._
## Slots
_None._
## Public API
_No public methods detected._
## Related resources
- Generated API docs (canonical): [`velin-code-block.md`](./velin-code-block.md)
- Generated index: [README.md](./README.md)
- CLI API: `npx velinstyle wc api velin-code-block`
- Human docs EN (tutorial): `docs/components/velin-code-block.html`
- Human docs DE (tutorial, lang-map): `docs/components/velin-code-block-de.html`
- Atelier library (showcases — **not** a 1:1 Component map): `atelier/library/index.html`
