Skip to main content

if

Create or remove a logical instance conditionally.

Quick reference​

SyntaxBehavior
if="open"Boolean evaluated in the surrounding scope before this element initializes state.

Example​

<Column state="{open:true}">
<Text if="open" text="Conditional content" />
</Column>

Rules and validation​

A false condition creates no instance. Reinsertion starts fresh state. The condition cannot read state initialized on the same element. Both visible and hidden branches remain statically validated. Use complementary if expressions for alternatives; there is no Else element.

Conditional content · show