Basic
A .code-block around a pre. The copy button sits in the top right corner.
With header
A title or a file name and a language label. The copy button moves into the header.
Line numbers and highlighted lines
Add .code-block-numbered and mark the lines to point out with .code-line-highlight.
Max height
Add .code-block-scroll to scroll long code vertically. Change the height with --tblr-code-block-max-height.
Header variants
The header can hold only a title, only a language, or both.
Markup
Any text works, also HTML. The copy button copies the code as written.
Long lines
Lines that do not fit scroll horizontally with the themed scrollbar. The page does not scroll.
Without copy button
Set copy={'{false}'} on the component, or leave the button out of the markup.