Resizable
API reference for @udecode/plate-resizable.
Installation
npm install @udecode/plate-resizable
API
useResizableState
Manages state for resizable elements.
useResizable
Provides resize behavior props and handlers for resizable elements.
useResizeHandleState
Manages state for resize handle elements.
Current resize direction.
Initial cursor/touch position.
Initial element size.
Whether resize direction is horizontal.
Whether resize is in progress.
Editor read-only state.
Update initial position.
Update initial size.
Update resize state.
Hover callback.
Hover end callback.
Mouse down handler.
Resize handler.
Touch start handler.
useResizeHandle
Provides handlers and props for resize handle elements.
onMouseDown
: Mouse down event handleronMouseOut
: Mouse out event handleronMouseOver
: Mouse over event handleronTouchEnd
: Touch end event handleronTouchMove
: Touch move event handleronTouchStart
: Touch start event handler
Whether the handle should be hidden (in read-only mode).
Props to spread on the handle element: