Code block
A dark code panel with copy-to-clipboard.
npm install ng-blatuiWith filename
hello.ts
const greet = (name: string) => `Hello, ${name}!`;Tabs
npm
pnpm
yarn
API reference
Inputs
| Prop | Type | Default | Description |
|---|---|---|---|
code | string | '' | Source code shown in the panel and copied to the clipboard. |
filename | string | null | null | Optional filename shown in the header; omit for the floating copy button. |
copyLabel | string | — | Accessible label for the copy button. |
copyShortLabel | string | — | Short visible text for the copy button. |
copiedLabel | string | — | Text shown briefly after the code is copied. |
Every ng-blatui component also accepts a class input to merge extra Tailwind classes onto the host.