Forum Documentation Showcase Pricing Learn more

[New Feature] Draggable/droppable elements

#1

This is an update we’re very excited to share, as it opens a lot of possibilities in terms of what you can do with Bubble! You can now add draggable elements, that users can drag around, and make them droppable, in which case this can trigger a workflow. This lets you do a lot: if you think about Tinder in a Bubble way, a workflow is triggered when a draggable picture is dropped on one of 2 drop areas, like and dislike.

To use this, you have to add the Plugin ‘Draggable Elements’ to your app. This brings 2 elements:

  • a draggable group, that behaves like a group data-wise, and that can be dragged around. You can either make it droppable, in which case it will trigger a workflow when dragged on a drop area.
  • a drop area that receives a draggable group, and that triggers a workflow.

We also have an action that lets you move a draggable element programmatically, which can be useful to highlight some parts of the interface, etc.

Here are some examples of how it works (please do not modify these pages)

  1. Simple draggable group: https://bubble.is/page?type=page&name=draggable&id=forumapp3&tab=tabs-2 / https://forumapp3.bubbleapps.io/version-test/draggable

  2. Draggable - Droppable elements + workflows: https://bubble.is/page?type=page&name=droppable&id=forumapp3&tab=tabs-1 / https://forumapp3.bubbleapps.io/version-test/droppable

Have fun!

44 Likes

Drag and Drop Sorting of Repeating Group Items
Draggable Kanban Board
Need help creating a Kanban board in my app
Advance interface objects
Move image position with workflow
#2

Love it! How will this affect our workflow count?

0 Likes

#3

Fantastic!!

0 Likes

#4

Wow :slight_smile:

0 Likes

#5

Well it’s a normal workflow. Counts the same.

1 Like

#6

I was just trying to do something like this! Yay. :smile:

0 Likes

#7

I´ve launched the simple draggable group link to see it live but I cannot drag it.

Is there something we need to activate in the browser or something?

0 Likes

#8

Awesome! Thanks a lot!

0 Likes

#9

This is superawesome! @emmanuel Thanks!

0 Likes

#10

Same problem … wonder if someone missed the message to not change anything.

1 Like

#11

Thanks for this feature. Solves an immediate problem in a project I’m redeveloping in Bubble right now. I had drag & drop in the previous/non-Bubble version.

0 Likes

#12

Fixed it.

3 Likes

#13

Agreed, Fantastic.

0 Likes

#14

If I wanted to save the position of draggable elements, I’d need to create some kind of position ranking system that saves to the DB triggered by drop areas right? Right now, if the page refreshes, the dragged elements (no drop area involved) will revert to their original placement because no save-able workflow for position was actually recorded, correct?

0 Likes

#15

I’ve been thinking about this, too. I’d love to have an easy way of building something like Trello, where we could rank/organize things in a list that keeps its arrangement every time I drop an element. This is a really, really great start that opens up a lot functionality, but I definitely look forward to what else might come down the pipe.

2 Likes

#16

We’re not at the trello level of functionality, though you could probably do a lot having a field ‘rank’ and when a droppable group is dropped on a cell you use the cell’s index as the new rank. You can experiment there.

@romanmg what is the use case? Wouldn’t a rank field do what you want?

0 Likes

#17

Yes a rank field should work. Was just confirming that that’s what I should do to save positions.

Use case for client is a virtual shelf that contains images (like a bookshelf with images of books) and they want their users to be able to place their books in whatever order they want on the shelf. Up to now, I’ve been using a repeating group and was about to implement a ranking system to “move” positions and it should achieve the same thing, but the drag and drop makes the interface MUCH friendlier for this kind of thing - will still need a ranking system to save those positions though.

2 Likes

#18

Fantastic !!! That’s HUGE improvement!

3 Likes

#19

That’s so awesome, what a great improvement.
Now all we need is Loops and else-if statements.

3 Likes

#20

That is awesome. Actually it took me a long time to understand why things were not being dropped until I saw this Droppable elements example.

I want to add drag and drop with move or copy option. How can I get the Keyboard input? For example, on the Workflow when the group is dropped, on “and when” is there a way to say that this second condition is if the key Ctrl was pressed?

0 Likes