Draggable Element Element
Getting Started | API | Elements | Actions | Validators | Handlers | Configuration Options | About
Table of Contents
1 Draggable Element - #draggable {}
The draggable element allows you to make a block of Nitrogen elements draggable by the user.
Combine the draggable element with the droppable element to allow drag and drop behavior.
Usage
#draggable { tag=drag1, clone=true, revert=false, handle=grip, body=[ #image { class=grip, url="/images/handle.png" }, #span { text="This is a draggable block." } ]}
Attributes
- tag - (Erlang term)
- The drag term to pass into the drop_event/2 event.
- body - (Nitrogen elements)
- The elements that will be draggable.
- group - (atom or string)
- The name of this drag group, for use in the droppable element's accept_groups attribute.
- handle - (atom or string)
- clone - (boolean)
- revert - (boolean)