Skip to content

Prototyping

Manage prototype interactions, reactions, and navigation flows.

Type reference
// Reactions wire up interactions: trigger (ON_CLICK, ON_HOVER, ...) → action (navigate, swap, overlay).
// Common patterns: button ON_CLICK → NAVIGATE to detail frame; card ON_HOVER → CHANGE_TO hover variant.
// Multi-action: pass actions[] array to run multiple actions on one trigger (e.g. navigate + set variable mode).
// ---
// IMPORTANT: destination rules depend on navigation type:
// NAVIGATE/SWAP/OVERLAY/SCROLL_TO → destination must be a top-level frame (direct child of a page). Nested frames are rejected.
// CHANGE_TO → destination must be a variant (COMPONENT inside a COMPONENT_SET). Used for hover/state swaps within the same component.
// ---
// TRIGGERS: ON_CLICK | ON_HOVER | ON_PRESS | ON_DRAG | AFTER_TIMEOUT(timeout) | MOUSE_ENTER(delay) | MOUSE_LEAVE(delay) | ON_KEY_DOWN(keyCodes)
// NAVIGATION: NAVIGATE (go to frame) | SWAP (swap overlay) | OVERLAY (show overlay) | SCROLL_TO | CHANGE_TO (swap component variant)
// TRANSITIONS: DISSOLVE | SMART_ANIMATE | MOVE_IN | MOVE_OUT | PUSH | SLIDE_IN | SLIDE_OUT (+ direction for directional)
// EASING: EASE_IN | EASE_OUT | EASE_IN_AND_OUT | LINEAR | GENTLE | QUICK | BOUNCY | SLOW
// ACTIONS: NODE (navigate/swap) | BACK (go back) | CLOSE (close overlay) | URL (open link) | SET_VARIABLE_MODE (switch theme/mode)

4 methods available.

Get reactions and overflow direction on a node

ParameterTypeRequiredDescription
idstringNode ID

Response

FieldTypeDescription
reactionsarrayReactions on this node
overflowDirectionstringOverflow scroll direction (NONE, HORIZONTAL, VERTICAL, BOTH)

Add a prototype reaction to a node

ParameterTypeRequiredDescription
idstringNode ID
trigger"ON_CLICK" | "ON_HOVER" | "ON_PRESS" | "ON_DRAG" | "AFTER_TIMEOUT" | "MOUSE_ENTER" | "MOUSE_LEAVE" | "ON_KEY_DOWN"Trigger type
triggerDelaynumberDelay in ms for AFTER_TIMEOUT / MOUSE_ENTER / MOUSE_LEAVE triggers
triggerKeyCodesnumber[]Key codes for ON_KEY_DOWN trigger
triggerDevice"KEYBOARD" | "XBOX_ONE" | "PS4" | "SWITCH_PRO"Device for ON_KEY_DOWN (default: KEYBOARD)
destinationstringTarget node ID (required for NODE actions). NAVIGATE/SWAP/OVERLAY: must be a top-level frame. CHANGE_TO: must be a variant (component inside a component set).
navigation"NAVIGATE" | "SWAP" | "OVERLAY" | "SCROLL_TO" | "CHANGE_TO"Navigation type (default: NAVIGATE)
transition"DISSOLVE" | "SMART_ANIMATE" | "MOVE_IN" | "MOVE_OUT" | "PUSH" | "SLIDE_IN" | "SLIDE_OUT" | "INSTANT"Transition animation (default: DISSOLVE). INSTANT = no animation.
transitionDirection"LEFT" | "RIGHT" | "TOP" | "BOTTOM"Direction for MOVE_IN, MOVE_OUT, PUSH, SLIDE_IN, SLIDE_OUT
durationnumberTransition duration in seconds (default: 0.3)
easing"EASE_IN" | "EASE_OUT" | "EASE_IN_AND_OUT" | "LINEAR" | "GENTLE" | "QUICK" | "BOUNCY" | "SLOW"Easing function (default: EASE_OUT)
actionType"NODE" | "BACK" | "CLOSE" | "URL" | "SET_VARIABLE_MODE"Action type (default: NODE). SET_VARIABLE_MODE switches a variable collection mode.
urlstringURL for URL action type
collectionNamestringVariable collection name (for SET_VARIABLE_MODE)
modeNamestringMode name to switch to (for SET_VARIABLE_MODE)
resetScrollPositionbooleanReset scroll position on navigate (default: true)
actionsarrayMulti-action: [{actionType, destination?, navigation?, collectionName?, modeName?, ...}]. Overrides single-action params.
itemsobject[]Batch: array of {id, trigger, destination?, ...} reaction items
idstringNode ID
trigger"ON_CLICK" | "ON_HOVER" | "ON_PRESS" | "ON_DRAG" | "AFTER_TIMEOUT" | "MOUSE_ENTER" | "MOUSE_LEAVE" | "ON_KEY_DOWN"Trigger type
destinationstringTarget node ID
navigation"NAVIGATE" | "SWAP" | "OVERLAY" | "SCROLL_TO" | "CHANGE_TO"
transition"DISSOLVE" | "SMART_ANIMATE" | "MOVE_IN" | "MOVE_OUT" | "PUSH" | "SLIDE_IN" | "SLIDE_OUT" | "INSTANT"
transitionDirection"LEFT" | "RIGHT" | "TOP" | "BOTTOM"
durationnumber
easing"EASE_IN" | "EASE_OUT" | "EASE_IN_AND_OUT" | "LINEAR" | "GENTLE" | "QUICK" | "BOUNCY" | "SLOW"
actionType"NODE" | "BACK" | "CLOSE" | "URL" | "SET_VARIABLE_MODE"
triggerDelaynumber
urlstring
collectionNamestring
modeNamestring
resetScrollPositionboolean
actionsarray

Response

FieldTypeDescription
resultsstring[]Array of "ok" per item

Replace all reactions on a node (raw reactions array)

ParameterTypeRequiredDescription
idstringNode ID
reactionsarrayFull reactions array — [{trigger:{type}, actions:[{type, destinationId, navigation, transition}]}]

Response

FieldTypeDescription
resultsstring[]Array of "ok" per item

Remove a reaction from a node by index

ParameterTypeRequiredDescription
idstringNode ID
indexnumberReaction index (0-based)

Response

FieldTypeDescription
resultsstring[]Array of "ok" per item