Skip to content

<notatio-when>

<notatio-when test="_n > 3">…</notatio-when> -- a run of prose that appears only while its condition holds, Tangle's conditional sentence.

test is a notatio predicate over the surrounding <notatio-tangle>'s knobs; the wrapper substitutes their values into it, and this element shows or hides its own children on the result. invert shows the children when the test is *false*, which is how the two halves of an either/or sentence are written.

The name is descriptive: Wolfram's If is an evaluation, not a display, and PaneSelector is about panes rather than a phrase inside a sentence.

Stories in the playground·packages/notatio-lit/src/notatio-when.ts· in Vue: <When>

Attributes

AttributeTypeDefaultNotes
teststring""The notatio predicate, over the tangle's knob wildcards.reflects
invertbooleanfalseShow the children when the test is false instead of true.reflects