{{ cms_text(name, { value: '...', class: '...' }) }}
Argument | Description | Data Type |
---|---|---|
name | The element identifier | String |
value (optional) | The text content to be displayed within the text component | String |
class (optional) | A space-separated list of CSS classes to style the text component | String |
The class
variable is only accessible in the code. All other variables are available in the Canopy editor.
Text component template
<div class={{ class }}>
{{ value }}
</div>
Rendered HTML output
<div class="text-purple-500">String passed in value</div>
Example
{{ cms_text('mytextcontent', { value: 'Blutui is pro-developer in everything we do', class: 'font-medium text-purple-500' }) }}