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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | ✓ | Node ID |
Response
| Field | Type | Description |
|---|---|---|
reactions | array | Reactions on this node |
overflowDirection | string | Overflow scroll direction (NONE, HORIZONTAL, VERTICAL, BOTH) |
Add a prototype reaction to a node
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | ✗ | Node ID |
trigger | "ON_CLICK" | "ON_HOVER" | "ON_PRESS" | "ON_DRAG" | "AFTER_TIMEOUT" | "MOUSE_ENTER" | "MOUSE_LEAVE" | "ON_KEY_DOWN" | ✗ | Trigger type |
triggerDelay | number | ✗ | Delay in ms for AFTER_TIMEOUT / MOUSE_ENTER / MOUSE_LEAVE triggers |
triggerKeyCodes | number[] | ✗ | Key codes for ON_KEY_DOWN trigger |
triggerDevice | "KEYBOARD" | "XBOX_ONE" | "PS4" | "SWITCH_PRO" | ✗ | Device for ON_KEY_DOWN (default: KEYBOARD) |
destination | string | ✗ | Target 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 |
duration | number | ✗ | Transition 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. |
url | string | ✗ | URL for URL action type |
collectionName | string | ✗ | Variable collection name (for SET_VARIABLE_MODE) |
modeName | string | ✗ | Mode name to switch to (for SET_VARIABLE_MODE) |
resetScrollPosition | boolean | ✗ | Reset scroll position on navigate (default: true) |
actions | array | ✗ | Multi-action: [{actionType, destination?, navigation?, collectionName?, modeName?, ...}]. Overrides single-action params. |
items | object[] | ✗ | Batch: array of {id, trigger, destination?, ...} reaction items |
↳ id | string | ✓ | Node ID |
↳ trigger | "ON_CLICK" | "ON_HOVER" | "ON_PRESS" | "ON_DRAG" | "AFTER_TIMEOUT" | "MOUSE_ENTER" | "MOUSE_LEAVE" | "ON_KEY_DOWN" | ✓ | Trigger type |
↳ destination | string | ✗ | Target 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" | ✗ | |
↳ duration | number | ✗ | |
↳ easing | "EASE_IN" | "EASE_OUT" | "EASE_IN_AND_OUT" | "LINEAR" | "GENTLE" | "QUICK" | "BOUNCY" | "SLOW" | ✗ | |
↳ actionType | "NODE" | "BACK" | "CLOSE" | "URL" | "SET_VARIABLE_MODE" | ✗ | |
↳ triggerDelay | number | ✗ | |
↳ url | string | ✗ | |
↳ collectionName | string | ✗ | |
↳ modeName | string | ✗ | |
↳ resetScrollPosition | boolean | ✗ | |
↳ actions | array | ✗ |
Response
| Field | Type | Description |
|---|---|---|
results | string[] | Array of "ok" per item |
Replace all reactions on a node (raw reactions array)
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | ✓ | Node ID |
reactions | array | ✓ | Full reactions array — [{trigger:{type}, actions:[{type, destinationId, navigation, transition}]}] |
Response
| Field | Type | Description |
|---|---|---|
results | string[] | Array of "ok" per item |
remove
Section titled “remove”Remove a reaction from a node by index
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | ✓ | Node ID |
index | number | ✓ | Reaction index (0-based) |
Response
| Field | Type | Description |
|---|---|---|
results | string[] | Array of "ok" per item |