Code
Code displays a code block with optional syntax highlighting and copy functionality
fmt.Println("Hello, World!")Installation
Install the component
templui add codeAdd the JavaScript to your layout
@code.Script()Call this template in your base layout file (e.g., in the <head> section).
Examples
API Reference
Required parameter
Hover for description
Code
API reference for the Code component.
| Name | Type | Default |
|---|---|---|
| | |
| | |
| | |
| | |
| | |