New to Kendo UI for Vue? Start a free 30-day trial

Dragging

Updated on Nov 27, 2026

The FloatingToolbar provides an optional drag mode that lets users reposition the component within the viewport. This is useful for design tools, PDF viewers, and other applications where users need to move the toolbar over the workspace.

Enabling Drag

To enable dragging, set the draggable prop to true. Its default value is false. The FloatingToolbar then renders a dedicated drag handle before the hosted tools.

Users can reposition the component with the pointer or press M from the focused handle or a hosted tool to enter keyboard Move mode. In Move mode, the arrow keys move the component in 10px steps. Press Enter or Space to commit the new position. Press Escape to restore the previous position and anchoring.

The viewport bounds the drag position. You cannot configure these bounds.

The following example demonstrates pointer and keyboard repositioning with draggable enabled. It displays the current position and the position where the last drag ended.

Example
View Source
Loading ...

Setting the Position Programmatically

Use the setPosition({ top, left }) method of FloatingToolbarHandle to move the component to explicit coordinates in pixels. Attach a Vue template ref to the FloatingToolbar to access its handle. For example, call floatingToolbar.value?.setPosition({ top: 40, left: 60 }) from your setup code.

An explicit position overrides containerAlign and detaches the toolbar from its anchor. It remains in effect until the component is remounted or its anchor or appendTo prop changes. Programmatic positioning does not require draggable to be enabled and is bounded by the viewport.

The handle exposes the following members:

  • element—The inner FloatingToolbar element, or null before rendering.
  • toolbar—The hosted Vue Toolbar component ref.
  • props—The current FloatingToolbar props.
  • focus()—Focuses the hosted Toolbar's current tool.
  • setPosition({ top, left })—Moves the FloatingToolbar to the specified position.

The following example uses a Button to move the FloatingToolbar to specific coordinates.

Example
View Source
Loading ...