switch

An input the reader flips by clicking it, drawn as a toggle at the end its wire leaves: the knob over to the right and the track lit in the circuit's high: hue when it is on. Its body is its label, set beside the toggle with its level beneath. value: is where it stands, and a !cue.to on it flips it at a step, so the prose and the circuit move together.

switchNode
Two switches, A on and B off, feeding an OR gate whose lamp is lit.Two switches, A on and B off, feeding an OR gate whose lamp is lit.

#Attributes

valueAnimatable
Its level, 0 or 1. Keyframe it to flip it at a step: value: 0 !cue.to{1}(at: 1).
Default0
fixed
Keeps the reader's hands off it — for a switch only the prose should move.
Defaultfalse
hiddenAnimatable
Declared but not drawn, and taking no room while hidden. Its level still drives what it is wired to. Animatable.
Defaultfalse

#Derived attributes

Computed while the element renders — read one with #id.name in attribute position or {{#id.name}} in prose, never set.

levelDerived
Where it stands, 0 or 1, as the reader or a cue last left it: {{#a.level}}.

#Allowed content

Body { }The switch's label, rich inline; further lines sit beneath it

#Allowed in

#Examples

switch#a{$A$}
switch#s{Set}(value: 0 !cue.to{1}(at: 1); fixed)

Last updated