Skip to main content



Optional. Specifies settings for drag-n-drop


There is 500ms delay when you drag-n-drop tasks on touch devices.


drag?: boolean;
drag?: {
expand?: boolean


To configure drag-n-drop, you can use either the short or extended option.

The short option:

  • drag - (optional) enables/disables drag-n-drop of tasks

The extended option:

  • drag - (optional) an object with settings for drag-n-drop. The object can include the following parameter:
    • expand - (optional) defines whether the collapsed tasks should expand when you hover them over during drag-n-drop

Default config

drag: true
// or
drag: {
expand: true


const { ToDo, Toolbar } = todo;

// create To do list
const list = new ToDo("#root", {
tasks: [
{ id: "1", text: "Task 1 #tag1" },
drag: {
expand: false

const toolbar = new Toolbar("#toolbar", {
api: list.api,

Change log: Added in v1.1

Related article: Configuration