openpencil/packages/docs/programmable/sdk/api/components/constraints-control-root.md
Danila Poyarkov d19c05f48e feat(editor): add resize constraints
- Add SDK-owned mixed constraint state, pin controls, and undo-aware updates
- Apply Figma constraint modes recursively during frame resize previews and commits
- Document and test the control, multi-selection behavior, and resize geometry
2026-07-17 18:32:58 +03:00

1.2 KiB

title description
ConstraintsControlRoot Headless constraint state and actions for frame children.

ConstraintsControlRoot

ConstraintsControlRoot exposes horizontal and vertical resize constraints for the current eligible selection. It is active for children of frames, components, component sets, and instances. Normal auto-layout children and top-level page layers are excluded; absolutely positioned auto-layout children remain eligible.

The default slot provides concrete or mixed axis values and undo-aware actions for setting modes or building an interactive pin control. Multi-selection changes are grouped into one undo entry.

Constraint values match the Figma Plugin API: MIN, CENTER, MAX, STRETCH, and SCALE.

Generated API reference

The following tables are extracted from the Vue source and JSDoc during the documentation build.