Learn Bubble with 500+ tutorials, courses & AI Assistant ✨

Limited time launch offer get $80 off today

0 days 0 hours 0 minutes 0 seconds
SAVE $80 NOW
Planet No Code logo
Bubble.io CoachingFounder MentoringSponsorships
LoginLearn Bubble.io

Create shop filter using Custom States & Option Sets

In this Bubble.io tutorial video we demonstrate how you can filter your products on a shop product page in Bubble.io. We'll be using Custom States and Option Sets to create this essential feature if you're building an ecommerce store with the Bubble app builder.

Join now $19/monthLearn more
Get 500+ tutorials, a No-Code AI Assistant, 4 premium courses, and everything you need to build faster!
Create shop filter using Custom States & Option Sets
Explore these topics...
Design
Conditional statement
Database
Custom States
Option Sets
Workflow
Set state

With just this tutorial learn...

Unlock the power of custom states: Learn how to create dynamic shop filters without coding!

Master option sets in Bubble: Discover how to build a flexible product filter for your e-commerce site.

Transform your e-commerce catalog: Create an intuitive color-based filter in under 8 minutes!

With membership you'll...

Learn how to build a ChatGPT Clone, Custom CRM for your business & SaaS Marketing website with Webflow & AI.

Unlock 500+ Bubble tutorial videos with AI powered Q&A.

Debug your Bubble app instantly with our custom trained No Code AI Assistant.

Join now $19/month
Risk-free! 14-day money-back guarantee. Cancel anytime.

Introduction to Custom States and Option Sets

In this video tutorial, I'm going to demonstrate how to use custom states and option sets to add a filter to this shop catalog page. You can see I have a number of different products, there are different colors and there are different products. T-shirts and pants/trousers for our American viewers. I'm going to focus in this video on color by using an option set.

Why Use Option Sets for Color

An option set is a good choice for color because it is something that I can set on the back end. I know all the colors that are likely to be used, I can set them in as an option set. But I would say it's maybe not a good choice for a category like is it a t-shirt or is it pants or trousers. Because if I want to be able to add categories on the front end, I can't do that of option sets.

Data Structure Overview

So if we just have a look at my data structure so that we're all on the same page. Here's my option set for colors and if I go into my data types products I have got a label and an image and a color set and then if we have a look at the data here are all my data entries and then on the front end I've got a repeating group and a place ready to put my filter.

Setting Up the Filter

Let's get started and let's put in a repeating group into the filter and the repeating group is going to be a type color and I'm going to show all colors and number of columns can be fixed number of rows. Let's make that a bit more flexible and reduce that down to 20 and then I made that a little bit too small for myself. Let's set the cell layout to column and then insert the color so that's the colors label. Make this width and if we check that on the front end. There you go you've got a list of all my colors.

Adding Checkboxes for Color Selection

So I now want to be able to check or to click on one and it only show items in that color. So let's do this with option sets and so I'm going to put an icon into each of the cells and I'm going to change that to a row and let's add a little bit of margin to the side of it and then change it to a box or I think it's square in front. Awesome there we go now I've got a checkbox let's make them a little bit larger. Brilliant and cool looking good.

Implementing Custom States

So I need somewhere to store my custom state. Custom states are a brilliant way for temporarily storing data nothing's getting written to the database nothing's being stored in current user if the page is refreshed your custom states are lost. So I'm just going to store them in fact that'd be a little bit confusing. You can store them on any element just pick something logical for you. So let's call this filter container and let's create custom state here and we'll call it show color and it's going to be a type color okay.

Creating Workflows for Color Selection

Now we need to create a workflow for if a user clicks on the box or clicks on the text. So to cut down the number of workflows we do we're going to group them in a row set the row to 100% of the width of the cell and then now it's in a group we can create a workflow. So when this is clicked we set state of filter container show color to current cells color and then so we can see that in action we're going to add a conditional statement here which is going to change the text box so that's where my custom state is stored show color.

Testing the Filter Functionality

So when show color is current group's color that's referring to just the individual cell icon to check. Let's test that okay and there we go and because I haven't set as a list every time I action it it replaces because the custom state can only hold one value and it's overwritten by clicking another value.

Adding Clear Filter Functionality

Now there's one other thing to add in which is what happens if I want to remove the filtering. So what's quite common on some shops is you'd have a button up here that says clear filter but to demonstrate the process with the checkbox we're going to add some conditional statements here so only when filter container show color is not cells color so it's going to enter the color if it doesn't already contain that color but then I need to have the opposite and I find that color coding these really helps so green is when data is being added red is going to be when data is removed so then I invert this statement so when the filters custom state show color is current selves color I'm going to here's a little trick with custom states if you want to empty you just leave it empty. So I still get the same effect but then if I click again it clears it.

Applying the Filter to the Product Display

Now how do I get this to impact my repeating group? So obviously when the page loads I want everything to appear so I've just got search products with no constraints and then for the purpose of this demonstration let's do it this way so when filter container show color is not empty I'm going to change the data source and so the data source is going to be search for products where color equals filter container color let's see how well that works so black and then you get black white white red got no green think so there you have it in less than eight minutes that's how you can create the beginnings of a product page with filtering using custom states and option sets in a future video we'll explore how you might use different categories like different types of clothing and so watch out for that we'll be recording that soon.

Table of contents

Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Your No-Code Journey Starts Here

The best way to learn Bubble.io?

Build No Code Confidently

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 500+ 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.

Monthly
Yearly
Member
Accelerate your Bubble app to launch
$99 / month
$19/month/mo
Includes:
500+ tutorials
4 premium courses
Find the right tutorial with our custom trained AI
New tutorials added each week
Cancel anytime
14 day money back
Join now
Member
Accelerate your Bubble app to launch
$990 / year
$149/year/mo
Includes:
500+ tutorials
4 premium courses
Find the right tutorial with our custom trained AI
New tutorials added each week
Cancel anytime
14 day money back
Join now

Frequently Asked Questions

Find answers to common questions about our courses, tutorials & content.

Do I need any coding experience?

No. Our Beginner Essentials course and AI No-Code Coach are designed for total newcomers. You’ll learn Bubble.io step by step - no coding required.

How does the AI No-Code Coach work?

Simply type your question in plain English, and our AI taps into the entire video library to recommend the exact lessons you need. It’s like having a personal instructor on demand.

How long can I access the content?

As long as you’re subscribed! With our monthly subscription, you get unlimited access to all 500+ videos, our growing course library, and the AI No-Code Coach.

What courses are included

Your subscription includes:

  • Bubble Beginner Essentials – Get up and running fast.
  • Build a ChatGPT Clone – Integrate AI into your no-code apps.
  • Build Your SaaS Website with AI – Learn to create a scalable startup site.
  • Develop a Custom CRM App in Bubble - Learn database relationships with a CRM.

Plus, new tutorials every week!

What if I get stuck on a lesson?

The AI No-Code Coach is your first stop for instant answers. If you need deeper help, you can book 1:1 Bubble coaching for expert guidance.

Do you offer a money-back guarantee?

Yes! If you don’t see real progress within 14 days, let us know, and we’ll issue a full refund—no questions asked.

Can I cancel anytime?

Absolutely. Your subscription is month-to-month, and you can cancel anytime—no lock-ins, no hidden fees.

What if I want more than just tutorials & courses?

Absolutely. Your subscription is month-to-month, and you can cancel anytime—no lock-ins, no hidden fees.

If you’re serious about building a successful SaaS startup, check out Mastery—our intensive mentorship program. Mastery goes beyond Bubble.io development and includes:

  1. 1:1 mentorship to fast-track your progress
  2. Marketing strategies tailored for no-code founders‍
  3. Product management insights to scale your startup‍
  4. Personalized support from experienced founders

‍

Still have questions?

Reach out to our dedicated team.

Contact
Services
Search Bubble TutorialsBubble.io CoursesBook Bubble.io CoachingApply for Mastery
Latest Bubble tutorials
Rerank Text By MEANING With Cohere In Bubble.io Step by Step!
Unlock RAG Providers for NO CODE AI App Development TODAY!
Better Tables with Built-in Search and Sort By in Bubble.io
Partnerships
Flusk.eu
VectorShift
Comnoco
Plumb
Toddle
Whereby
Get started with no code
AI Powered No Code AppsNo Code Web ScrapingBubble.io Plugin tutorialsBubble API Connector tutorialsStudent & Teacher DiscountBest tools for no coders
Follow us
Youtube
X
LinkedIn
Planet No Code logo
In partnership with
Queen Mary University of London Logo
© 2024 Planet No Code. All rights reserved.
Privacy PolicyTerms of ServiceCookies SettingsContact Us