Skip to main content

ClickHandlerBox

The ClickHandlerBox is a wrapper around a regular div that provides callbacks for some typical mouse events, like clicking and dragging.

nametyperequiredcomment
idstringyes
ariaLabelstringno
boxPosition{ height?: number; left?: number; rotate?: number; top?: number; width?: number }no

Optionally transform the dimensions and position of the underlying div

childrenReactNode | ReactNode[]no
classNamestringno
onClick(eventValues: PointerEventValues) => voidno
onDragEnd(eventValues: PointerEventValues) => voidno
onDragMove(eventValues: PointerEventValues) => voidno
onDragStart(eventValues: PointerEventValues) => voidno
onInteractEnd(eventValues: PointerEventValues) => voidno
onInteractStart(eventValues: PointerEventValues) => voidno
onPointerEnter(eventValues: PointerEvent<Element>) => voidno
onPointerLeave(eventValues: PointerEvent<Element>) => voidno
onPointerMove(eventValues: PointerEvent<Element>) => voidno
roleAriaRoleno
styleCSSPropertiesno

Demo

Result
Loading...
Live Editor