Code

A highlighted block of code with an optional title.

Display Added in v0.67.0 Updated

Default

save.latte
{ui button, title: 'Save' /}

{ui code,
	code: "{ui button, title: 'Save' /}",
	language: 'latte',
	title: 'save.latte',
/}

code is the source as a string, or a code field. language sets how a string is highlighted, php by default, and a field brings its own. syntax picks the syntax theme, the field's own or the default when it is not set, and title is a label above the code, such as a file path.