Skip to content

prosekit/solid/resizable

import {
  ResizableHandle,
  ResizableRoot,
} from 'prosekit/solid/resizable'

<ResizableRoot>
  <img src="..." />
  <ResizableHandle>...</ResizableHandle>
</ResizableRoot>

Props for the ResizableHandle Solid component.

position?: "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right"

The position of the handle.

"bottom-right"


Props for the ResizableRoot Solid component.

width?: number | null

The width of the resizable element.

null

height?: number | null

The height of the resizable element.

null

aspectRatio?: number | null

The aspect ratio of the resizable element.

null

onResizeStart?: (event: ResizeStartEvent) => void

Emitted when a resize operation starts.

onResizeEnd?: (event: ResizeEndEvent) => void

Emitted when a resize operation ends.

const ResizableHandle: Component<ResizableHandleProps & JSX.HTMLAttributes<ResizableHandleElement>>

A Solid component that renders an prosekit-resizable-handle custom element.


const ResizableRoot: Component<ResizableRootProps & JSX.HTMLAttributes<ResizableRootElement>>

A Solid component that renders an prosekit-resizable-root custom element.