How to use a reusable element and why you should
In this Bubble.io tutorial we demonstrate how to create a reusable element in a Bubble app and explain the benefits of using reusuable elements wherever possible.
Master reusable elements: Save time and streamline your workflow with this essential Bubble feature!
Unlock the power of product cards: Learn how to create dynamic, reusable elements for your repeating group designs.
Boost your app's efficiency: Discover why reusable elements are crucial for responsive design and maintaining consistency across your Bubble app.
Creating Reusable Elements in Bubble
Here's a quick video looking at how to use reusable elements in Bubble and why it can save you loads of time and it's a great practice and habit to get into. So I have a marketplace app here that I'm building and I have a product page, product listing page here and if I go into the editor you can see here I've got my repeating group and it contains in each cell, let's just pop that open in the elements tree, you can see here that I've got a group and then inside that group contains an image and two pieces of text.
The Need for Reusable Elements
Now my product card here I want that to appear in multiple places around my site, I want to have like catalog pages or category pages, I want to have search results pages, I might want to have a slider on my home page which goes through my products and each time I want it to be displaying the same card. So this is a perfect instance of when to use a reusable element.
Creating a Reusable Element
To create a reusable element you can either right click or go edit when selecting the group containing everything you want to be past the element and you can click convert into a reusable element. I'm going to call this product card. Okay and what Bubble does it takes me to basically like a page which is just my element. I've got all the usual controls being able to change the design, being able to nest elements within each other but you can see here all importantly the type of content is still product.
Implementing the Reusable Element
So how do I connect this back up to my design? So if I go back onto my listing page it hasn't actually done anything with this element that I initially created like the one-off element and I've seen people get confused by this so here's how to use it well. Delete that and then I scroll down to reusable elements and into my repeating group which I've missed with my selection but I'll just drag it down from the element tree. There we go. Into my repeating group goes my product card.
Setting Up the Data Source
Let's have a look at that. It's not going to work that's the heads up because I've not told my card, my reusable element, where to get data from. I have to give it a data source and so that is current cell's product. Now if I click preview it looks exactly how it did before with of course the big advantage that if I go to product card and remember if I had this reusable element multiple places my search results and my home page and I wanted to add in another field for example then I only need to update it in one place and it gets updated in multiple instances of the reusable element.
Benefits of Reusable Elements
It's also helpful because if I'm building a responsive app I only have to work on the responsiveness of this particular part of my app in one instance and then of course it's a reusable element it's duplicated throughout all of the other instances that I placed it in the app.
Get the Complete Bundle for Just $99
Access 3 courses, 390+ tutorials, and a vibrant community to support every step of your app-building journey.
Start building with total confidence
No more delays. With 30+ hours of expert content, you’ll have the insights needed to build effectively.
Find every solution in one place
No more searching across platforms for tutorials. Our bundle has everything you need, with 390+ videos covering every feature and technique.
Dive deep into every detail
Get beyond the basics with comprehensive, in-depth courses & no code tutorials that empower you to create a feature-rich, professional app.
Save over 70%!
Valued at $80
Valued at $85
Valued at $30
Valued at $110
Valued at $45
Can't find what you're looking for?
Search our 300+ Bubble tutorial videos. Start learning no code today!
Have questions?
We have answers!
Find answers to common questions about our membership plans, programs, and more.
We're here to help you launch your no code SaaS. Reach out to the team and we'll double check our vast library for useful content. We'll advise you on how we'd tackle the same problem and there's a good chance we'll record the video to help the wider community.
As a Planet No Code member, you'll receive a discount on our Bubble coaching sessions. Monthly members receive a 10% discount, while Annual members receive a 17.5% discount. To redeem your discount, simply log into your account and book a coaching session through our platform.
Our 8-week intensive mentorship program is designed to provide personalized guidance and support to help you accelerate your startup journey. You'll be matched with a startup expert who will work with you one-on-one to set goals, overcome challenges, and make rapid progress.
To apply for the Mastery Program, simply click the "Request Invitation" button on our pricing page and fill out the application form. Our team will review your application and schedule a call with you to discuss your goals and determine if the program is a good fit for your needs.
We accept all major credit cards, including Visa, Mastercard, American Express, and Discover.
While we don't offer a free trial, we do provide a 14-day money-back guarantee. If you're not completely satisfied with your membership within the first 14 days, simply contact our support team, and we'll issue a full refund.