Freedom and Flexibility
Create dynamic, flexible and reorderable layouts without complex workflows or layout restrictions.
NWD Swapeasy (Drag and Drop) simplifies the creation of dynamic, reorderable layouts in Bubble, allowing you to turn groups and repeating groups into intuitive drag-and-drop structures with minimal configuration. Visually reorder elements, control their position, and persist ordering without complex workflows or manual state management.
Built for what Bubble does not cover.
Bubble has no native drag and drop. There is an official Bubble plugin, Draggable Elements, but a reorderable layout then takes several components nested in a precise structure, plus dozens of workflows, conditionals and custom states. It gets worse in a free layout like a dashboard or a widget panel, where the structure does not repeat itself as it does in a repeating group.
Styling is limited too, with almost no built-in animation, so that has to be rebuilt with conditionals and workarounds. And reading the resulting order back is hard work, while keeping it persisted between sessions burns through workload units (WUs).
Create dynamic, flexible and reorderable layouts without complex workflows or layout restrictions.
Draggable elements and drop areas are automatically recognized based on the structure.
Control animations, movement behavior, and interaction modes.
Triggers events on drag start, drop, and order change.
Works smoothly on both desktop and mobile devices.
Designed to run smoothly while avoiding WU consumption, depending on the save method.
In detail
In the Bubble editor, go to the tab "Settings > General > Advanced options" and check the box "Expose the option to add an ID attribute to HTML elements".
Build the required basic structure (container, drop areas, and draggable elements) according to your use case and set an unique ID for the container element.
To prevent compatibility issues, avoid starting IDs with numbers or symbols. Start with letters and use hyphens or underscores if needed.
Insert the plugin element anywhere on the page and ensure it is always visible.
In Bubble, any element-type plugin must be visible to work properly.
In the plugin element, provide the ID assigned to the target element (in step 2) and set the other plugin properties according to your needs. If the selected saving method is manual, check the step-by-step instructions in the documentation to configure it correctly.
Swapeasy does not build the layout, it drives the one you build in Bubble. There are two possible structures and the right one depends on the use case. The only rule they share: the ID goes on the main container, and on nothing else.
For an arrangement that does not repeat, such as a dashboard or a panel of widgets, where every position is its own element.
For a static or dynamic list, such as a menu, where the Repeating Group already repeats the cell for you.
Swapeasy is an element-type plugin, so the plugin element and the target container have to be visible at the same time, both when the page loads and whenever the container is shown later. While one is visible and the other is hidden, the plugin cannot recognize the container, in either direction. When visibility is conditional, for example a container shown only on desktop, repeat the same conditions on the plugin element, or put both inside the same group so they are always shown and hidden together.
When keeping both visible together is not possible, because the container is born hidden or is only shown much later, use the Reload action right after it becomes visible: Reload remaps the structure inside the container and applies the current order.
The properties below set the behaviour, not the structure. Swapeasy accepts two different structures, a free layout and a list, and which elements you need changes between them: see The structure Swapeasy expects, right after How to use.
Provide the ID that was assigned to the target element (the main container, which will contain all the required structure).
The ID goes on the main container and on nothing else, and which element that is depends on the structure: a common Group for a free layout, a Repeating Group for a list. See The structure Swapeasy expects.
Enables or disables the drag and swap interaction.
Sets when two elements swap places: as soon as the dragged element hovers a drop area, or only when it is dropped.
Sets the type of animation when dragging and swapping elements: dynamic is smooth, spring is elastic, none is instantaneous.
By default the dragging action starts as soon as the element is clicked/touched, but when enabling this property the dragging action will require clicking/touching and holding for a moment to start. Useful mainly on touch interfaces, such as cell phones and tablets, it reinforces security by preventing accidental movements.
Sets the direction of movement, restricting the dragging interaction to a specific axis: vertical, horizontal, or both.
Enables automatic scrolling in the main container when an element is dragged over a long list that requires scrolling.
Sets how Swapeasy handles order storage and persistence: automatic does it for you, manual leaves it to your workflows.
The two methods trade one cost for the other. Automatic saves on the user's device, so it costs no Workload Units, and the restored order does not travel between devices. Manual can cost Workload Units when the order goes to the database, and in exchange the same order comes back on any device.
Sets the relationship between the border radius of the drop area and the draggable element.
While a swap is still in progress, the border radius of the elements can be briefly affected. It returns to normal as soon as the draggable element is dropped, and the fix is planned for a future version.
If border radius correlation is set to "general", this value sets a default border radius for all drop areas and draggable elements.
Sets the background color of the currently hovered drop area (while an element is being dragged).
Sets the border style of the currently hovered drop area (while an element is being dragged).
Sets the border width (in pixels) of the currently hovered drop area (while an element is being dragged).
Set a transparent border of the same width on the drop area in its normal state. Without it, the element grows by the border width the moment it is hovered and the layout jitters, because the border is being added to an element that had none.
Sets the border color of the currently hovered drop area (while an element is being dragged).
Sets the opacity of the element currently being dragged.
Values the element exposes for the rest of the page to read.
Evaluates whether the order has been changed after the draggable element is dropped (yes/no).
Returns the current order value (numeric string) whenever a position swap is completed or initially set (E.g.: 1,2,3,4).
Where a workflow can start.
Event that can be triggered when an element starts to be dragged.
Event that can be triggered when the element being dragged is dropped.
Event that can be triggered when a swap occurs and the current order is different from the previous one. Use this event to trigger actions to save the new order.
Event that can be triggered when the order provided in the element or action does not have the correct format or the number of items (numeric elements in the string) does not correspond to the structure within the main container.
Event that can be triggered when Swapeasy is initialized.
What a workflow can tell the element to do.
With the manual save method three pieces work together: the Order changed event says when the order changed, the Current order state carries the value to store as text, and Set order applies a stored order back, which is best triggered by the Initialized event. Set order also works on its own, to apply a different order by condition, such as one arrangement above 576px and another below it. When no order is ever applied, the elements start in the structural sequence they have in the editor.
Sets the item order based on a provided numeric string.
The value of this field must be a valid string (numbers separated by comma) and must correspond to the number of draggable elements in the created structure (E.g.: 1,2,3,4).
Remaps the structure and applies the corresponding item order.
Use it when the structure inside the main container is not the one Swapeasy read at initialization. Three cases: a new record in a Repeating Group fed by a data type; a container that was hidden when the page loaded and is shown later; and a container whose contents your workflows rebuilt. Trigger Reload after the change and Swapeasy remaps the structure and applies the current order. For the first case there is NWD - Swapeasy Sentinel, the second element in this plugin: place it inside the Repeating Group and use its Loaded event to trigger Reload.
Where a workflow can start.
Event that can be triggered when the element is loaded.
No. Swapeasy was designed to be easy to implement. Just follow the step-by-step instructions in the documentation and choose the structure that best fits your use case.
Yes. Drag actions are automatically mapped to touch interactions on mobile devices. For a better mobile experience and to avoid accidental dragging, we recommend enabling the Drag on hold option. This ensures the drag action only starts after pressing and holding the element for a few milliseconds.
Yes. Swapeasy now supports static lists (Option Sets, text, number, date, etc.) or dynamic lists. But it does not yet support nested lists. Nested lists will be supported in a future version (under development).
This depends on your layout and data structure. Both approaches are supported, and the best choice varies by use case. For more details, see the note at the top of the Target element section.
No. You only need to assign a unique ID to the main container. All other elements follow the defined structure automatically. For more details, see the note at the top of the Target element section.
Make sure the plugin element is visible on the page, which is required for it to work. Then verify that the Swap enabled property is turned on, that the main container ID matches the ID set in the plugin, that the ID is valid and does not start with a number, and that each drop area, when your layout uses them, contains only one draggable element.
Review the Save section to ensure order saving and restoring are configured correctly.
This plugin is maintained by GCS Studios and is part of the NWD UI - Enhancer family, plugins that add behavior an element did not have, without replacing it. Each one attaches to something already on your page, such as a group, a popup, a repeating group, a button or an input, and changes how it responds, with no layout to redo, and is tested in real applications before release. See more plugins on the GCS Studios contributor page.