Manual
Overview
Language
IntroductionScenes & structureText & inlineGraphsCode panesAnimationDataReuse & logicExpressions & parameters
Elements
Text
ParagraphHeading 1Heading 2Heading 3Heading 4Unordered ListDivider
Media
ImageTableEquation
Callouts
NoteDefinitionExampleTask
Graph
GraphLinePolygonCurveIntegralScatterHistogramPointSegmentVectorCircleSquareRectangleTriangleStarDiamondHexagonTextAxis labelAxis BraceFitResidualsContourHeatmapParameter
Code
Code canvasLines
Animation
CueDraw cueTrace cueHighlight cueSpotlight cueType cue
Structure
SceneStep
Reference
Internote Reference
Inline
Formatting
BoldItalicsInline CodeHighlightLink
Text colour
Red textOrange textYellow textGreen textTeal textBlue textPurple textPink textGrey text
Maths
Maths
Reference
Internote ReferenceValueConstant
Other
FootnoteIcon
Directives
DatasetIncludeConstantsTemplatePresetConditionalForIgnore
Keyframes
KeyframeZoom keyframe
Attribute types
?
  1. Directives
  2. Conditional

Conditional

@ifDirective

Compiles its body only when every condition holds. The attribute group IS the conditions — each `key: value` tests a `@let` constant by exact value — so `@if` has no attributes of its own. At least one condition is required, and a condition naming an undeclared constant is a compile error.

Allowed content

Body { }The content to keep when the conditions hold — any Chalk that is legal where the @if is written

Examples

@let(audience: teacher)

@if(audience: teacher){
    note{
        Answers are collected in the closing scene.
    }
}
On this page
Examples
Conditional · Internote