The Element SDK is in beta and not yet publicly released — APIs may change without notice.
The api object passed to every render function — animation, storage, assets, params, and more
Every render function receives two arguments: the resolved props from your schema, and an ElementApi object. The api object is your element's window into the host environment.
The raw Chalk node for this element. Contains the authored content and parsed attributes before schema resolution.
api.element.body — the text content written inside { } in Chalkapi.element.detail — the content written inside [ ]api.element.attributes — the raw attribute list (prefer using a schema instead)api.element.animation — the parsed cue config, if the element is wrapped in cue{} or cue.morph{}A short callout element that reads body content and an optional colour attribute:
The current scene animation state. Use this to drive time-based or cut-based behaviour without reading from the cue hooks directly.
isPaused — true while the student has paused playbackcurrentPartitionIndex — the active scroll partition (1-based), or null in time-based scenesrestartCounter — increments each time the scene is restarted; watch it to reset stateful simulationsThe animation hooks (useFade, useDraw, useMorph) read from this state internally — you rarely need to access it directly unless you are building custom animation behaviour.
Per-element key/value storage. State saved here persists across page reloads and sessions, scoped to this element instance and the current user.
See the Storage page for full patterns and guidance.
Current parameter values for slider-driven attributes. If an educator uses a parameter element in the same scene, its current value is available here.
A circle whose radius is driven by a slider the educator places in the scene:
Asset URL resolution. When an educator has uploaded a file (image, dataset, audio) to an internote's asset library, you can resolve it to a public URL here.
api.assets is null when no asset context is mounted — for example, in a preview or testing environment. Always guard against null before calling resolveAssetUrl.
true when the board is in fullscreen mode. Use it to toggle detail level, show more controls, or adjust layout.
Coordinate-to-pixel mapping for elements rendered inside a diagram. Only present when a parent diagram element provides a DiagramScaleProvider. Used when building geometry diagram children.
The element-hash-keyed interaction store. This is the lower-level system that api.storage builds on — it stores state keyed by a stable content hash of the element, so the same authored element restores its state across reloads. Most elements should use api.storage rather than api.interaction directly.
Always 'board'. The SDK is board-only by design — narrative rendering is handled separately. This field exists for type-checking purposes.