{{ cms_text(name, { value: '...', class: '...' }) }}
ArgumentDescriptionData Type
nameThe element identifierString
value (optional)The text content to be displayed within the text componentString
class (optional)A space-separated list of CSS classes to style the text componentString

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' }) }}

Was this helpful?

Copyright © 2024 Blutui.