Skip to content

Drag Handle

Last updated 27 Oct 2026

NbDragHandle is the six-dot grip you press to move a block, a table row or a table column. It is a real button with a name, a visible focus ring and a keyboard path, and it reports a drag without performing one: where the item may land, what the drop indicator looks like and how the data reorders all belong to the host.

Native drag and drop ​

Editors built on ProseMirror move blocks with the browser's own drag and drop, and need to fill dataTransfer themselves. Set native and the handle becomes draggable and forwards the DragEvent on drag-start:

vue
<NbDragHandle
  native
  :label="`Move ${block.label}`"
  @drag-start="({ event }) => startBlockDrag(event as DragEvent)"
/>

The keyboard path is the same in both modes.

Props ​

PropTypeDefaultDescription
labelstring(required)Accessible name. Name the thing being moved.
axis'vertical' | 'horizontal' | 'both''vertical'Glyph and arrow keys.
sizenumber16Glyph size in pixels.
thresholdnumber4Pixels a pointer must travel before a press becomes a drag.
nativebooleanfalseUse HTML drag and drop and forward the DragEvent.
instructionsstringEnglish keyboard helpDescription read on focus.
announcementstring''Contents of the polite live region.
disabledbooleanfalseRenders the handle inert and cancels a drag in progress.

Events ​

EventPayloadDescription
drag-startIDragHandleEventA drag began.
drag-moveIDragHandleEventThe pointer moved, or an arrow key was pressed while held.
drag-endIDragHandleEventThe item was dropped.
drag-cancelIDragHandleEventThe drag was abandoned. Undo any preview.
ts
interface IDragHandleEvent {
  via: 'pointer' | 'keyboard' | 'native'
  clientX?: number
  clientY?: number
  deltaX: number
  deltaY: number
  direction?: 'up' | 'down' | 'left' | 'right'
  event: Event
}

Exposed ​

MemberTypeDescription
cancel() => voidCancels a pointer or keyboard drag.
draggingRef<boolean>A pointer or native drag is in progress.
grabbedRef<boolean>A keyboard user is holding the item.
elRef<HTMLButtonElement | null>The button.

Tokens used ​

TokenApplied to
--nb-c-text-subtle / --nb-c-textGlyph at rest / on hover and focus
--nb-c-surface-hoverHover background
--nb-c-primaryHeld outline and glyph
--nb-c-focus-ringFocus outline
--nb-c-component-disabledDisabled glyph