This file covers spatial editing, auto-layout, grids, grouping, booleans, sizing, constraints, and alignment behavior.
w: set widthh: set heighthw,wh: set width and height together
Behavior:
- works on
RESIZABLEnode types - uses
resolveDelta(), so values like+10and/2are relative - clamps width and height to at least
0.01
lar,lockar: toggle aspect ratio lock
Behavior:
- works on selected nodes that expose Figma aspect ratio lock support
- aspect ratio lock toggles all selected lockable nodes; mixed selections lock all, fully locked selections unlock all
mt,-my: move upmb,my: move downml,-mx: move leftmr,mx: move right
Behavior:
- supported on
POSITIONABLEnodes - guarded by
IsNotInAutoLayoutorIsAbsoluteInAutoLayout - uses absolute numeric movement, not delta-aware movement
pol,x: distance from leftpor,-x: distance from rightpot,y: distance from toppob,-y: distance from bottom
Behavior:
- uses parent width or height for right/bottom placement
- requires a dimensioned parent container
- guarded by
IsNotInAutoLayoutorIsAbsoluteInAutoLayout
alh: wrap selection into a horizontal auto-layout framealv: wrap selection into a vertical auto-layout framera: remove auto-layout by setting layout mode toNONE
alh and alv have special conversion logic:
- if exactly one group is selected, the plugin converts the group directly into a frame
- the new frame inherits the group's size and position
- default white frame fill is removed
- padding starts at
0 - if exactly one frame is selected, the plugin enables auto-layout on that frame instead of wrapping it in a new parent
- group children and selected frame children are sorted by x or y before insertion
- spacing is inferred from the first two children
For multiple selected nodes:
- nodes are wrapped in a new frame at the first node's position
- selection order is normalized by x or y before insertion
- spacing is inferred from the first two selected nodes
lh: set auto-layout direction to horizontallv: set auto-layout direction to verticallw: set auto-layout wrap
Notes:
lhandlvonly appear when the selection is already frame-like and in auto-layoutlwcan be applied to frame-like nodes directly
vf: vertical fillvh: vertical hughf: horizontal fillhh: horizontal hug
Important runtime behavior:
- if
fillis requested on a child inside a plain non-auto-layout frame, the plugin resizes the node to match the parent dimension instead of setting a layout property - if
fillis requested on an absolute-positioned child, the plugin resizes the node to match the parent dimension and moves that axis to0because the child does not participate in auto-layout fill sizing - if the selected node itself is frame-like and has no auto-layout, the plugin can enable auto-layout before setting its layout sizing property
vhandhhrequire auto-layout contextsvfandhfare available in more than one context because of the special-condition guard setup
g: set primary gap, orAUTOwhen no value is givensb: force space-between
Behavior:
- only for row/column auto-layout containers
- numeric values are delta-aware
- numeric values also force
primaryAxisAlignItems = MIN - no value switches to
SPACE_BETWEEN
vg: set vertical/counter gap, orAUTOwith no valuevsb: force counter-axis space-between
Behavior:
- only for wrapped auto-layout containers
- numeric values update
counterAxisSpacingon wrap layouts - no value switches
counterAxisAlignContenttoSPACE_BETWEENon wrap layouts
cg: set grid column gaprg: set grid row gap
Behavior:
- only for grid layouts
- numeric values are delta-aware
- values update
gridColumnGapandgridRowGap
tg: set tidy / smart selection gap on the current selection, or use the dominant existing gap with no valuetrg: set tidy / smart selection row gap on the current selection
Behavior:
- works on multi-selected sibling layers that form a row, column, or grid-like tidy selection
- also works on a single plain frame when Figma exposes
inferredAutoLayout - numeric values reposition layers to emulate tidy-up spacing
- on multi-row or multi-column tidy selections,
tgnormalizes shared columns or rows instead of spacing each row or column independently tgwith no value uses the dominant existing gap on the active tidy axis- tidy row gap requires at least 2 inferred rows or columns
p: all sides, with 1/2/3/4-value shorthandph: horizontal paddingpv: vertical paddingpl: left paddingpt: top paddingpr: right paddingpb: bottom padding-pl: all sides except left-pt: all sides except top-pr: all sides except right-pb: all sides except bottom
Shorthand behavior:
p20-> all four sides20p20,30-> top/bottom20, left/right30p20,30,40-> top20, left/right30, bottom40p20,30,40,50-> top/right/bottom/left-pb24-> top/right/left24, bottom unchanged
Important notes:
- padding values are delta-aware
- negative results are clamped to
0 - no-value side commands reset their scope to
0 - except-side commands require a value
- only frame-like nodes are supported
c: toggle clip content
Supported on:
- frames
- components
- component sets
- instances
lg: set uniform grid size, or toggle grid visibility with no valuelgc: set stretch column countlgr: set stretch row countlgg: set row/column gutter sizelgm: set row/column margin/offsetlgrm: remove all layout grids
Important behavior:
lgonly manages theGRIDpattern and leaves row/column grids intactlgcandlgrreplace only their respective patternlggandlgmupdate existing row/column grids only- if no row/column grids exist,
lggandlgmnotify instead of creating one lgwith no value toggles visibility on existing grids only
Defaults:
- row/column gutter default:
20 - row/column offset default:
0
ro: set rotationrowith no value resets rotation to0
Behavior:
- delta-aware
- rotates around the current visual center
- clears legacy plugin data keys
originalXandoriginalYif present
fh: horizontal flipfv: vertical flip
Behavior:
- mirrors the relative transform
- then compensates x or y so the node stays visually in place
s: scale by percent, wheres100means100%sw: scale to a target widthsh: scale to a target height
Behavior:
- uses Figma
rescale() - minimum scale factor is
1%
maxh: set or clear max heightmaxw: set or clear max widthminh: set or clear min heightminw: set or clear min widthap: toggle absolute positioning inside auto-layout
Notes:
max*andmin*are optional-value commands- no value clears the stored min/max property by setting it to
null - numeric values are delta-aware against the current min/max if present, otherwise against the node's current size
aptoggleslayoutPositioningbetweenABSOLUTEandAUTO
Horizontal:
cl: leftcch: centercr: rightclr: left and right / stretchcsh: scale
Vertical:
ct: topccv: centercb: bottomctb: top and bottom / stretchcsv: scale
Behavior:
- only exposed outside auto-layout
- preserves the untouched axis while changing the requested axis
These nine commands use smartAlign() and are intended for auto-layout frames, with optional parent-forcing behavior.
atl,alt: top leftatc,act: top centeratr,art: top rightacl,alc: center leftacc: centeracr,arc: center rightabl,alb: bottom leftabc,acb: bottom centerabr,arb: bottom right
Behavior:
- with no value, scope is
AUTO - with any value starting with
p, scope is forced toPARENT - in
AUTOscope, auto-layout alignment is attempted first - when the auto-layout primary axis is already
SPACE_BETWEEN, the primary distribution is preserved and only the counter axis is updated - if auto-layout handling does not apply, the plugin falls back to aligning the node inside its parent by x/y coordinates
at: topab: bottomal: leftar: rightavc: vertical centerahc: horizontal center
Behavior:
- with one selected node, alignment is relative to the parent container
- with multiple selected nodes, alignment is relative to the shared selection bounds
at,ab,al, andarare intentionally guarded to non-auto-layout contextsavcandahcdo not carry that registry guard
atlp,altp: parent top leftatcp,actp: parent top centeratrp,artp: parent top rightaclp,alcp: parent center leftaccp: parent centeracrp,arcp: parent center rightablp,albp: parent bottom leftabcp,acbp: parent bottom centerabrp,arbp: parent bottom right
Behavior:
- always align directly inside the parent
- can operate on multiple selected nodes independently
- skips normal flow children inside auto-layout parents; use absolute positioning first when coordinate-based parent alignment is intended there
gr: group selectionugr: ungroup groups or frames
Important notes:
- grouping requires at least two selected items
- all selected nodes must share the same parent
- ungrouping collects the resulting children and selects them
- ungrouping accepts both groups and frames
un,u: unionsu,sub: subtractin,int: intersectex: exclude
Behavior:
- requires at least two selected layers
- runs against the current page
csm: set corner smoothing explicitlycsi: shortcut to60, matching the plugin's "iOS" preset
Behavior:
csmis delta-aware- the runtime clamps values between
0and100 - stored Figma value is normalized to the
0..1range internally