diff --git a/README.md b/README.md index 7042191..f081988 100644 --- a/README.md +++ b/README.md @@ -149,6 +149,37 @@ The following events are available: * `tab.on("unflash", (tab) => { ... });` * `tab.on("close", (tab) => { ... });` +## Drag and drop support + +Electron-tabs is compatible with [Dragula](https://github.com/bevacqua/dragula) so you can easily make your tabs draggable. + +Install Dragula: + +``` +npm install dragula --save +``` + +Don't forget to add a link to its stylesheet in the header: + +```html + +``` + +Then call Dragula in your script once tabGroup is ready: + +```javascript +const TabGroup = require("electron-tabs"); +const dragula = require("dragula"); + +var tabGroup = new TabGroup({ + ready: function (tabGroup) { + dragula([tabGroup.tabContainer], { + direction: "horizontal" + }); + } +}); +``` + ## License The MIT License (MIT) - Copyright (c) 2016 Thomas Brouard