API Reference > ui-components > Toolbar > useDragInteraction useDragInteraction Function Hook used on expandable item that require drag or long press to open useDragInteraction(onClick?: () => void, onOpenPanel?: () => void): { handleButtonClick: () => void, handlePointerDown: (e: PointerEvent<Element>) => void } Parameter Type Description onClick () => void Function called when item is clicked. onOpenPanel () => void Function called when item is dragged or long pressed to open panel. Returns - { handleButtonClick: () => void, handlePointerDown: (e: PointerEvent<Element>) => void } Defined in ui/components/src/ui-components/toolbar/useDragInteraction.tsx Line 72 Last Updated: 11 June, 2024