Nova · Layouts
Templates
A string with {{…}} in it is a template. Each expression between the braces is resolved and written into the sentence.
{
id: 'templates',
data: { name: 'Ada', count: 3 },
layout: {
component: 'Stack',
children: [
{ component: 'Text', children: 'Hello, {{$.name}}.' },
{
component: 'Text',
children: '{{$.count}} new messages',
},
],
},
}Hello, Ada.
3 new messages
Nothing. It is only drawn.
{ name: 'Ada', count: 3 }Hello, Ada. 3 new messages
Left: the action as the package ships it. Right: the same action running in this page, rendered with this site’s components. Below: the action run as the example specifies, on the installed package.