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. Attribute types

Attribute types

Every value in Chalk is a string until an attribute's declared type parses it. These are the types the element reference links to — what each accepts, and what it looks like written down.

stringprimitive
Plain text value.
Accepts
Any text
hello
Introduction to Graphs
x-axis label
numberprimitive
Numeric value (integer or decimal).
Accepts
IntegerDecimal
0
2
-3.5
booleanprimitive
True/false toggle.
Accepts
truefalse
true
false
colourenum
Theme-aware named colour token.
Values
neutralredorangeyellowgreentealbluepurplepinkgreywhiteblack
blue
neutral
programming-languageenum
Language identifier for code/editor blocks. Supports many aliases.
Values
autoplaintextjavascripttypescriptpythonjavagorustsqlchalkother
typescript
auto
histogram-orientationenum
Direction of histogram bars.
Values
verticalhorizontal
vertical
horizontal
icon-nameenum
Name of the inline icon to display.
Values
tickcross
tick
cross
shape-typeenum
Marker shape used for scatter points.
Values
circlesquarerectangletrianglestardiamondhexagon
circle
triangle
easing-functionenum
Animation timing function. `smooth` is the default; `linear` is constant speed.
Values
linearsmooth
smooth
linear
intervalcustom
Interval notation with inclusive/exclusive bounds.
Accepts
[start, end](start, end)[start, end)(start, end]
[-10, 10]
(0, inf)
[-inf, inf]
parametised-intervalcustom
Interval that can include parameter expressions in bounds.
Accepts
Interval-like syntax with expressions
[-10, 10]
[a, b]
grid-stepcustom
Grid spacing mode.
Accepts
autoPositive integer
auto
2
5
index-listcustom
Comma-separated indices and ranges. Letters map to positions (A=1).
Accepts
Single indexComma-separated listRange
1,3,5
1-4
A,C-E
cell-listcustom
Spreadsheet-like cell references and ranges.
Accepts
A1A1,B2A1-C3
A1,B2
C3-C5
single-charcustom
Exactly one alphabetical character.
Accepts
Single letter
x
t
parametised-numbercustom
Number value that may reference parameters/expressions.
Accepts
NumberParameter-based expression
2
a
2*a+1
parametised-expressioncustom
Math expression that may include parameter variables.
Accepts
Expression string
x^2 + 2x + 1
sin(a*x)
parametised-coordinate-listcustom
Coordinate pairs with optional parameterized values.
Accepts
(x,y) pairs
(0,0),(1,1)
(a,2),(b,3)
durationcustom
Animation duration value in milliseconds (internally normalized).
Accepts
Integer duration
500
750
1200
duration-autocustom
Either explicit duration or auto-calculated timing.
Accepts
autoInteger duration
auto
1200
duration-or-integercustom
Either a duration value or a scene index integer.
Accepts
DurationInteger index
0
500
2
optional-duration-or-integercustom
Nullable version of duration-or-integer.
Accepts
nullDurationInteger index
null
0
500
optional-durationcustom
Nullable duration value.
Accepts
nullInteger duration
null
300
string-listcustom
Comma-separated list of strings.
Accepts
Comma-separated text values
Chrome, Safari, Firefox
number-listcustom
Comma-separated list of numbers.
Accepts
Comma-separated integers or decimals
65, 19, 4, 12
1.5, 2.0, 3.7
colour-listcustom
Comma-separated list of colour names from the colour enum.
Accepts
Comma-separated colour names
blue, teal, orange, grey
orientationenum
Direction of a two-pane split.
Values
horizontalvertical
horizontal
vertical
ratiocustom
One share over another, written as a fraction — the first pane's share of a split over the second's.
Accepts
a/b
3/2
1/1
interpolationenum
How a line gets from one reading to the next: `linear` joins them, `step` holds and jumps.
Values
linearstep
linear
step
fit-modelenum
Model family for a fit.
Values
polynomiallinear
polynomial
element-render-modeenum
How the element presents: 'inline' for a static display in place, 'environment' to expand into the board.
Values
inlineenvironment
inline
environment
rich-textcustom
Inline Chalk content — formatted text, `$maths$`, links, and inline elements all render.
Accepts
Any inline Chalk
local maximum
the mean $\mu$
referencecustom
A `#id` reference to an element or dataset declared elsewhere in the document — with member access where an attribute or column is wanted.
Accepts
#id#id.member
#survey
#fit-graph
#f.slope
coordinatecustom
A single (x, y) pair; either value may be a parameter expression.
Accepts
(x, y)
(0, 0)
(a, 2)
curve-pathcustom
The curve to follow: a `#id` reference to a curve or fit, or an expression in x given directly.
Accepts
#idExpression in x
#flight
x^2 - 1
parametised-number-listcustom
Comma-separated numbers, each of which may be a parameter expression.
Accepts
Comma-separated numbers or expressions
1, 2, 4
a, 2*a
parametised-surface-expressioncustom
Math expression over the plane — the one place `y` is legal alongside `x` — that may also reference parameters.
Accepts
Expression in x and y
x^2 + y^2
sin(x) * cos(y) + a
surface-colourcustom
How a surface is painted: a single hue from the colour palette, or a ramp — `multicolour` (full spectrum) or `temperature` (blue through white to red).
Accepts
Colour namemulticolourtemperature
multicolour
temperature
blue
cue-anchorcustom
When something fires, in scene time: a step index, an absolute time, or a step with a time offset.
Accepts
Step indexAbsolute timestep + offset
2
1500ms
2 + 500ms
optional-cue-anchorcustom
Nullable cue anchor — null means the cue never fires on its own.
Accepts
nullStep indexAbsolute timestep + offset
null
2
4 + 1.5s
On this page
stringnumberbooleancolourprogramming-languagehistogram-orientationicon-nameshape-typeeasing-functionintervalparametised-intervalgrid-stepindex-listcell-listsingle-charparametised-numberparametised-expressionparametised-coordinate-listdurationduration-autoduration-or-integeroptional-duration-or-integeroptional-durationstring-listnumber-listcolour-listorientationratiointerpolationfit-modelelement-render-moderich-textreferencecoordinatecurve-pathparametised-number-listparametised-surface-expressionsurface-colourcue-anchoroptional-cue-anchor
Attribute types · Internote