@platejs/resizable exports two headless React components and length utilities.
The package owns pointer, touch, keyboard, RTL, ARIA, and transient resize
behavior. Registry components own styling and editor persistence.
Resizable owns the private family context consumed by nested handles. No
provider or raw resize store is part of the public API.
Resizable
OptionsResizableProps
Controls resize direction math. Defaults to center.
Maximum width. Defaults to 100%.
Minimum width. Defaults to 92.
Commits the finished width to the owning feature.
Current width. Defaults to 100%.
React 19 ref for the inner resizable element.
ResizeHandle
OptionsResizeHandleProps
Resize edge. Defaults to left.
Starting size. The handle reads its parent when omitted.
Called during mouse or touch hover.
Called when hover or resizing finishes.
Overrides the nearest Resizable callback.
The handle renders a slider, disappears in read-only mode, listens on
window while dragging, and supports arrow keys. Hold Shift for a larger
keyboard step.
Types And Length Utilities
API
Contract
ResizeDirection
`'bottom'
ResizeLength
`number
ResizeEvent
{ delta; direction; finished; initialSize }
resizeLengthClamp
Clamps a pixel or percentage length against mixed constraints.
resizeLengthToRelative
Converts pixels to a percentage.
resizeLengthToStatic
Converts a percentage to pixels.
Related Components
Media covers media elements that consume these primitives.