Code block

A dark code panel with copy-to-clipboard.

npm install ng-blatui

With filename

hello.ts
const greet = (name: string) => `Hello, ${name}!`;

Tabs

API reference

Inputs

PropTypeDefaultDescription
codestring''Source code shown in the panel and copied to the clipboard.
filenamestring | nullnullOptional filename shown in the header; omit for the floating copy button.
copyLabelstringAccessible label for the copy button.
copyShortLabelstringShort visible text for the copy button.
copiedLabelstringText shown briefly after the code is copied.

Every ng-blatui component also accepts a class input to merge extra Tailwind classes onto the host.