penpot_align_shapes
Align selected shapes to a common edge or center using visible bounding boxes, without moving the group as a whole.
Instructions
Align two or more shapes to a common edge or center, matching Penpot's own align actions — instead of the caller computing pixel positions itself from penpot_get_shape results. "edge" is one of: "left"/"right" (snap every shape's left/right edge to the leftmost/rightmost shape's), "top"/"bottom" (same, vertically), "center-h" (center every shape horizontally on the group's mid-x), or "center-v" (center vertically on the group's mid-y). Aligns on each shape's visible bounding box (its selrect), so rotated shapes line up by their rendered bounds; the group as a whole never moves (the reference line comes from the shapes' own extent). Applied as a single update-file change-set; shapes already on the reference line are left untouched.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edge | Yes | ||
| fileId | Yes | ||
| pageId | Yes | ||
| shapeIds | Yes | ||
| tokensPath | No | /app/tokens.json |