set_scroll_behavior
Set frame overflow direction and child scroll behavior to control scrolling in Figma prototypes, making elements fixed or scrollable.
Instructions
Set prototype scrolling: overflowDirection on a frame, and/or make a child FIXED (fix position when scrolling) or SCROLLS. FIXED moves the node to the top of its parent's layer order (last child); in an auto-layout parent this also changes the node's position in the flow. SCROLLS moves a fixed node back to the top of the scrolling children. STICKY_SCROLLS is not supported by the Figma Plugin API and returns an error.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"nodeId": "<nodeId>"
},
"name": "set_scroll_behavior"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | ID of the node (a frame for overflowDirection, a child of a frame for scrollBehavior) | |
| scrollBehavior | No | Scroll behavior of the node inside its parent frame | |
| overflowDirection | No | Scroll direction of the frame's overflowing content |