Nova · Actions
Toggle
toggle flips a boolean. The layout draws a line only while it is true.
{
id: 'toggle',
data: { open: false },
layout: {
component: 'Stack',
children: [
{ component: 'Button', ref: 'flip', children: 'Details' },
{
if: '$.open',
then: {
component: 'Text',
children: 'Doors open half an hour before.',
},
},
],
},
triggers: [
{
event: 'ui:click',
ref: 'flip',
do: [{ toggle: 'open' }],
},
],
}press flip
{ open: true }Details Doors open half an hour before.
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.