Demo

b-draggable

An element which may be used to add draggable behavior to an element.

Usage

<b-draggable handle=".drag-handle">
    <div>
        <div class="drag-handle"></div>
        <p>Lorem ipsum...</p>
    </div>
</b-draggable>

API

Attributes

  • handle: a CSS selector that points to the element to be used to drag the object (defaults to the whole object).
  • axis: constrains the draggability along an axis (x or y).
  • containement: specifies an element that defines the boundaries of the draggable area: parent or <selector>.