Live demo — this example is server-driven; run the showcase locally for the interactive version.

Code block

Use Code block straight from a Qute template — parameters and slots instead of Java builders. This reference is generated from the runtime template sources: each template documents its parameters and slots in the header comment shown beneath its include line.

Templates

code-block

{#include components/data-display/code-block /}
Code block — PatternFly v6 
 Optional: id — DOM id on the root; omit unless something else references the code block.
              copyButton (optional — show copy-to-clipboard in header) 
 Content: pass code text via {#content}...{/content} block 
 Model mode: pass codeBlock=<org.sitenetsoft.quarkus.pha.model.CodeBlock> — code comes from the model, not the slot.