02-Custom_States - SCAI004
Sloup
1 follower
Sep 8, 2025
04-N Code Software Buiding\09-Short-Cut Tips and Techniques\02-Custom_States - SC 004
In this video, I'm going to show you how to work with custom states in your bubble app.
Custom states are an incredibly powerful and flexible capability
that allows you to work with temporary values.
That's all it is, temporary values.
Structurally, they're very similar to database fields.
So in your data structure, you have data types,
you can create a number of fields for them,
you give each field a custom internal label,
and you define the format of that field's value.
So is it a text, an image, a number?
Is it a list of values?
Or is it a single value?
So you can do the same thing with custom states.
The only difference is that the values are not stored in the database.
The custom state values are stored or attached to some visual element on the page.
Now you're in control of what the custom state is called, just like the fields,
where it lives on your page, just like when you define which data types the fields are on,
and also what format this custom state value is going to be.
Just remember that when you give a custom state a value,
which I'll show you how to do in a moment, it's temporary.
So if the user were to refresh the page or leave the page and then come back,
that value resets to a default.
This default could be just an empty value, right?
There's no value or a specific default that you define.
Again, I'll show you where you can do that.
Also, custom states are per page,
so they don't necessarily carry over unless you do something with it,
unless you take that value and pass it over to a different page
using a number of different data passing methods,
which we have gone over in other lessons, okay?
So I am on our Sandbox page here,
where we also demonstrated how to work with custom events.
And down below, I have a couple of examples for common use cases for custom states.
Just remember that custom events in custom states are two completely different things.
They both have the word custom in them, but they do not relate to each other in any way.
Custom events are custom workflow triggers that you can create in your workflows, right?
You go to your custom item here, and then you create a custom event,
and workflows can trigger custom events.
They can sequence each other.
You can schedule custom events to run after a certain delay, okay?
That's all that custom events are.
They are custom workflow triggers.
Custom states are completely different and are simply a way for you to create
and work with and manipulate temporary values on the page.
There's many things that you can do with custom states.
If you get really complex with them, or you can also keep it very, very simple,
it's really just a way for you to keep track of values
that don't necessarily need to involve the database.
So you can have pre-calculations.
I'm going to show you how you can keep track of selections that user makes from a list.
They can be used to support a lot of visual interactions,
just to make certain features behave in a certain way.
Again, not necessarily be saved to the database.
Now, you can, of course, save the custom state values to the database if you need,
but you don't always have to do that.
So let's first get comfortable with the idea of a state, okay?
So let's look at this button here,
and I'm going to go into the conditions and add a condition.
Now, a button has a few built-in states that Bubble has exposed for us.
So Bubble is letting us know if this button is clickable or not.
If we go to this expression here, the button isn't clickable.
The clickable state is a yes or no value.
It either is or isn't clickable, right?
And you make a button not clickable by checking this box here, okay?
So when something is not clickable, you can't trigger a workflow.
That's all that means.
So that is one of the button's built-in states.
It's a yes or no value with the label of clickable.
So if the value is yes, then we know it is clickable, right?
We kind of assign that environment to it,
and we now know, okay, if it isn't clickable,
we are going to be preventing certain things, for example.
Another built-in state is the hovered state,
and actually Bubble has the state in both directions here.
The button can be either hovered or not hovered,
and this is literally if the cursor is on top of the button.
That is what the hovered state is.
So it's another yes or no,
and Bubble actually has it in both directions
depending on how you want to create the condition here.
So hovered is the name of the state,
but the value of the state is a yes or no value.
It either is or is not hovered.
Same thing for pressed, right?
A pressed state is when you're literally holding down your mouse key,
your cursor on the button, and you haven't lifted up yet.
You haven't completed the click.
That's all that the pressed state is.
It's actually a state that doesn't get used very often.
I don't want you to think of it as a click
because it's not the same as a click.
It's just when you're holding down your mouse key.
And visible is another state.
This one is used much more frequently
because there's all sorts of conditions around showing and hiding things.
So the visible state, again, the name of it is visible,
and the value is a yes or no.
So all of these built-in states are yes or no values
that Bubble has built in for you.
You may find other pre-built-in states for other visual elements,
but I just wanted to point out that this is what we're talking about
when we're talking about a state.
It's some property with some label on it
that is going to be defined by some format, right?
It's a text. It's a yes or no.
It's a number, okay?
Now, custom states are a way for you to create your own values
that you can attach to whatever visual element that you want, okay?
Now, I want to show you a very basic example.
This group that we have here is called group custom states.
Now, you create a custom state on a visual element.
Let me actually rename this group.
Let me call it group CS example.
I don't want you to get too confused with the word custom state.
This is just the name of my group.
You add custom states to your visual elements
by opening up the inspector.
There's also another way to do it for the workflows.
There's a little bit of a shortcut.
We'll take a look at that in a moment here.
But this is really the main way
because you can manage all of your states
saved to an element here in this window.
So, I've gone ahead and I've already created a custom state here.
So, I clicked on add a new custom state.
I typed in the name.
Notice that this window is very familiar.
It's very similar to creating a field on your data structure.
And I created a state called calculated value.
I just, you know, gave it whatever name I wanted.
And I defined the state type as a number.
In this case, I want to work with a number.
But notice that your states can be any value.
It can be generic, text, number, date, yes or no.
It can be one of your option set values.
It can be any of your data type records.
Okay, so an entry in your data.
It could be a user, a company record, things like that.
It can also pull from your API responses.
It can be anything you want, any dynamic data source
or even a static data source, you know,
if you're going to hard code the value.
You have that capability, just like a field,
just like a field in your data structure.
You can also make this value a list or a single value.
So, that's what I did to create the new state.
I'm not going to duplicate that, but I do have it right here.
So, I can change the name of the state if I want.
I can change the format.
I can make it a list.
And I can also define a default.
Let's say I want to give this a default of the number 300.
So, I just type that in.
Notice that this particular window here
does not take a dynamic value.
I do have to hard code whatever value there.
Now, if I did want to give my state a more dynamic value,
maybe when the page is loaded
or if the user displays a certain group,
this would happen in the workflow,
which we'll look at in a moment.
Okay, now this state lives on this group.
If I go to another group, let's say this purple group here,
this is a separate group.
Open up the inspector.
I'm not going to find the state there.
The page is also considered a visual element
that you can add custom states to.
Now, there's a little bit of strategy
around where you add your states.
For the most part, it doesn't really matter where you put it.
A lot of people like to put all of their custom states
that they work with on the page at the page level
because it's easy to find.
The page isn't going anywhere.
You don't have to keep track of what groups,
especially if you later delete a group,
you delete the states that go with it.
But on the flip side,
if you have lots of states that you're working with,
and that's certainly a thing that happens
with large applications,
it can get very cumbersome to manage all of those states
from one big list here.
So the other side of the strategy
is to put the states on some group or some element
that is most relevant to where the state is going to be used.
So in this case,
I want to display my calculated value here
inside of this group.
And so I'm going to place my state at the group level.
I can, of course, do it on a text.
I can put it on these buttons.
But no matter what is referencing that state,
it's going to have access to that value
because all I need to find is the group in this case,
or all I need to find is the page.
Let me show you what I mean.
So I have a text element here,
and let me clear this out
so you can see me do this from scratch.
I just want to display my calculated value.
So the state lives on that group,
which I call CS examples.
I'm just going to search for it by name.
And you can see here a couple of other built-in states
that Bubble has is the dimensions of this element,
the width and the height.
So these are numbers as well.
I can't delete these because these are built-in states,
but notice here's my custom state
that I've named calculated value.
And there's a little trash can icon
because that's a state that I created,
and I can delete it if I want.
Check out the shortcut for creating a new custom state
directly from this expression.
If you're moving through your development quickly,
and you know that you need a state,
you can create one really quick
right out of the box right there.
And it's going to attach it to that element.
And of course, I can go back to the group,
and I'll be able to find that new state here.
So if I navigate to the calculated value,
it's going to display the number.
Notice it evaluates to a number
that's the format of my state.
Okay, now this was a text element.
It happens to be inside of the group,
but it doesn't really,
it doesn't matter where this element lives.
As long as they get access to the group,
then I can access that value.
Let me refresh the page here so that we can see
without any workloads or anything,
all I've set up is the default
of that calculated value to 300.
So that's what it's going to show me immediately.
Under the inspector, you know,
you can look for your element group CS example,
and we can see the values of those states, right?
Custom states and other values.
So width and height would be considered other values.
These are those built-in states.
That's the dimensions currently of this group.
And there's my calculated value.
Okay, now I do want to point out,
there are a couple of exceptions
of where you're not going to be able
to access a state very easily.
The first place is inside of repeating groups.
So if I have a state, let's say on this icon,
and I create a state called,
you know, enabled or something like that.
And this is a yes or no.
Okay, this state lives on the icon,
but the icon is inside of a repeating group cell.
So this icon, let's call this icon circle like this.
Now, if I want to reference that state enabled
from outside of the repeating group,
let's just pull this up here from this text again, right?
First of all, I can't even find the icon.
You know, I named it circle.
It's called icon circle.
I can't find it because it lives
inside of the repeating group cell.
And that's just something in general
that you can't access elements or inputs
or states inside of a cell from outside of the cell.
You can access them as long as the thing
that's trying to access them is also inside.
So this text, for example,
would be able to access that
because it's inside of the cell, right?
Here, icon circle,
and then I can go to the enabled state.
So just be mindful of that.
There are plenty of reasons
why you would want to put a state inside of the cell, right?
If you want to create conditional formatting
on elements inside of the cell
that have to do with other elements
that only pertain to that cell,
then that's a perfect use case,
especially because each cell
may have a different value for that state.
That's a perfect use case for it.
But if you're looking to access those values
from outside of the cell,
then it doesn't make sense to put them
on any elements inside.
You probably just need to change
the way that you're approaching,
you know, how you're working with that value
if that's something that you're trying to do.
The other exception is with reusable elements.
Reusable elements are kind of like a separate page.
So any states that live inside of a reusable element
would not be accessible
by elements outside of the reusable, right?
So if you've got to,
let's see if we can add one here.
Let's go to maybe this blue header.
I'm going to add this to my page right there.
Okay.
So if I open up this reusable element
and I added a state to this text,
okay, like this,
some state and this is,
let's say that this is another yes or no value.
The elements on my page,
go back to my sandbox here,
would not be able to access
that state that I created, right?
The state lives on that job app text.
Okay.
And I would not be able to access,
I can't find that text
because it's inside of another element
that's sort of embedded on this page.
Very similar to the repeating group.
Now, you can share states
that live on the reusable element
as long as the state is at the reusable element level.
Okay.
So not any of these internal elements, right?
So this is the workaround.
It's not even a workaround.
This is how you want to approach states
with reusable elements
if they need to be accessed from the page level.
Okay.
So I'm going to remove this here.
Now, if I go to the reusable element itself,
let's make sure that I click that.
So here, reusable blue header.
Okay.
Here, if I add the state here,
and I'm just going to, again,
create a state called enabled,
we'll say yes or no, like this.
This state is accessible
from outside of the reusable.
I'm going to go back to my sandbox.
Okay.
And show my,
it's just so that we can see here.
There's my reusable.
And from here, if I go to the blue header, right,
there's the instance of my reusable.
Here, I do have access to that state.
So you just want to make sure that you put the state,
if the reusable is involved,
at the reusable level.
Okay.
That way you can access those values
from outside of the reusable,
as well as inside.
Okay.
It's kind of a bridge to get to those values.
Just make sure you do that
and not on any of the internal states.
Now, of course, if you have states internally,
you know, inside of the reusable
that don't need to be accessed from outside,
then that's fine.
You know, you can place them internally.
That's okay.
But if they need to be shared,
they have to be at the reusable level.
Okay.
So let me undo that.
Let me remove,
let me just clear out this state here.
Just to clean this up.
We don't need that there.
I'm going to go back to my sandbox
and I'm going to remove the header from the design.
We no longer need it.
Okay.
Now, what if I want to change the value of this state,
this calculated value that I have defaulted
to the number 300?
Well, that's where you need to trigger a workflow action.
So I've got one set up here for this button
with, you know, just the number 10 as the label.
In the workflows,
and I do have a folder here called custom states.
When this button is clicked,
we're going to change the value of the state.
And we do this through this element action
set state.
Okay.
And when you have this action,
you're going to be asked to first find the element
that the state lives on.
So in this case, it's my group CS example.
And then you want to locate the custom state.
Again, you can technically create multiple custom states.
So you need to choose.
This is another area where you can create one
and just kind of on the go.
And then here you can define your value.
Now this field,
unlike the default in the inspector window of the group,
this will let you put in dynamic values, right?
So if I wanted to pull some value from the database
or from an input,
or I wanted to do some math with this,
I could do a calculation there
or I can just type in a number if I want.
Okay, I'm going to show you with the 400 button
that I have here,
just kind of arbitrary numbers.
So if I start edit workflow with this button,
let me put this in the folder here.
I want to go to the element actions,
set state,
choose my group where the state lives,
calculated value.
And then I'm going to hard code 400.
Or again, I can change,
you know, manipulate this value,
pulling things from inputs from the database.
I can do calculations here.
You can also set multiple states at once
if the group has multiple states here.
So setting multiple states
will only work for the same element.
If you have other states on other elements,
you would need to have other actions
because this only works with one element at a time.
But you can set multiples there.
Okay, right.
So that's how we would set the state
and change the value.
If I wanted to clear the state,
I have a reset button over here.
So if I wanted to revert it back,
right, so clearing the state,
all I need to do is run the same set state action
and I can clear out the value.
I just leave this blank.
Okay, so I'm going to refresh the page
so we can see the workflow running.
And this text, remember,
is just outputting the value of the state.
Notice that we have not touched our database.
These are numbers that we're setting and changing
kind of in real time here on the page.
So by default, it's 300.
I click on 10, it's 10, 400, right?
We're just changing that value, reset.
Oh, actually, this is going back to my 300
because that's the default value.
If I wanted to reset to fully clear it,
what I would do in this case
is not set the default to 300,
but instead do something like a pages loaded workflow
and then set the state
so that as soon as the page is loaded,
it automatically sets that value to 300.
And then not have the default here on this group.
Okay, I'll just clear this out.
That way my reset button,
when it goes to truly clear out the value,
it will be empty if that's something that I want to do.
So let's just refresh that real quick here.
So we'll still see the same effect
that as soon as I load the page,
it will be set to 300 immediately
so that first workflow runs.
But now I can reset it a little bit differently.
So there's 300, 400, 10, reset.
Now it's empty.
Okay, so that's just kind of to show you
how to set the state,
how to display the state,
where to find it.
Now let's look at a common use case
for working with custom states,
which is to create a tabbed system,
a tab design where the user can kind of switch
between different screens
that you have designed on one page.
Now, I have set this up a little bit.
Let me just take you through.
I have a group here called group tabs.
Inside of this group,
I have three hidden groups.
I've colored them differently
so that we can keep them apart.
Notice the names, tab one, tab two, tab three.
Now I only want them to display one at a time.
And I want the user to control which group to show
based on clicking these buttons up above.
So we're going to leverage a custom state
to keep track of which tab we are on.
Now, you may be thinking,
well, why not use the show and hide action?
To show one group and hide another.
Well, that's fine if it's a very binary thing.
If you're showing one and hiding another,
you're just kind of toggling between the two.
But the moment you have three or more groups involved
where the user could be coming
from any one of those groups to go to another one,
the show and hide is going to get way more cumbersome
because you're going to end up having to add
a bunch of hide actions for every possible group
that could be shown, right?
A custom state is one value.
It's one action.
It is much more dynamic.
It's much more scalable
if you have many more groups to toggle between, okay?
So let's set up our state.
I'm going to add my state
to this primary container here, group tabs.
This is the parent of the three tabbed groups.
And I'm going to add a state here called current tab.
And I'm going to set this value to a number as well.
I could also set it up as a text.
We're going to use a number.
And I'm going to have it default to tab one, okay?
So if I click on tab two,
so create a workflow for this.
I'm going to put this in my custom states here.
And I'm going to go ahead and color code these
so that we can keep track of the tab workloads.
If I click on tab two,
I'm going to set the state of that parent group,
group tabs, current tab to the number two, right?
I click on button two.
It's going to save the value to two.
I'm going to copy this expression
or the entire workflow,
paste it to set up my next workflow a little faster.
If I click on tab three,
then the state's value is going to be three.
And we do also want to set it up for tab one,
because let's say I'm coming from tab two to tab one.
We want to be able to go back to tab one.
Tab one is the default,
but I do want to be able to come back to it if I move away.
Tab one, tab two, tab three.
All right, so we've set the values.
But that currently has no relationship
to the visibility of the groups.
Clicking on these buttons will set the state,
but these groups are not reacting
or responding to that state.
They need to communicate with that state as well.
So what I'm going to do
is add a condition to each of these groups.
By default, these groups are not visible on page load.
Notice over here, right?
We don't see any of those colored groups.
They're not visible on page load.
But I'm going to add a condition.
When the custom state,
which lives on this primary group,
tabs here,
when the state's current tab is one,
I just typed in the number one.
When the current tab,
which is a number,
is, so in other words,
equals the number one,
then this group is going to be visible.
This is specifically on group tab one.
I'm going to right click,
copy this condition,
and go into tab two,
and right click,
paste the condition,
and just change the value.
When the current tab is two,
then this group is visible.
For tab three,
going to do the same thing.
When this value is three,
I just put in a whole bunch of other things here.
All right, when this value is three,
then this group is visible.
So each of them have a unique condition
to make them visible
so that only one is shown at a time.
So let's check this out.
I'm going to refresh the page here.
We should see the first tab visible by default
because I set it to number one
at the default value.
We don't have a way to kind of deselect or unselect,
but we certainly could if we wanted.
So right now we're seeing that first group.
Click on tab two,
there's the next group,
tab three,
back to tab one.
I can go in any order,
right?
I do not have to worry about
showing and hiding specific actions,
or I should say showing and hiding specific groups.
The custom state is all that I need.
One value that each of these groups
are responding to in their conditions.
If this is three, then it's visible.
If it's two, then it's visible.
It's a much more scalable way
to switch between groups.
Now I have only three groups,
but I promise that the more,
you know, groups that are involved
with this kind of a system,
this tab system,
the more convenient it's going to be.
We can also add conditions
to the buttons themselves
to help the user understand
which tab they're currently on.
So if I go to the group tab one
and copy this condition,
go to this button here,
and paste this,
the button's already visible.
It's always going to be visible,
but I'm just working off of the expression.
Maybe I want to just change the background color.
I'll essentially change the background style
to flat color,
and we'll change the background color
to kind of like a lighter blue,
something like this.
I'll go to this here.
All right, just a little bit of color
to show the user
that something has happened,
that it's responding to that state.
I'm going to copy this condition,
paste it to the other button,
and also just update the numbers
just for consistency.
We'll have the same colors
applied to all three buttons.
So now we've got six visual elements
all responding to this custom state
to create a very specific interaction
and visual experience for the user.
Again, we have not even touched the database.
There's nothing to do with the database here.
It's just working with these visual elements.
Okay, so now it's more of a cleaner,
more intuitive visual experience for the user
to understand where they are.
We're helping orient them, right?
And we're only seeing one group at a time.
Okay, let's move on to our next example here,
which is using a state
to keep track of selections.
Again, not touching the database,
but what we're going to do
is take the selected items, right?
I have a list of users here,
and I want to be able to select those users
and then do something
with those selected users.
In this case,
I'm going to set up an email action,
but you can do other things.
Once you have the list of selected users
in your temporary value,
right, your custom state,
maybe you update all of those records at once,
right?
Maybe you set a value for a field
within each of just those user records,
or you create other things
that are related to them.
There's a lot that you can do
now that you have a specific segmented list.
Okay, so let's begin by creating our state.
I'm going to put this on the repeating group here,
and I'm going to add into the inspector
a new state called selected.
And this is going to be a list
of users.
Okay, so the repeating group itself
is just a search for users.
I'm filtering it
so that I only see my users with full names,
but my custom state is a list of selected users.
That's what it's going to be for, right?
This is just my internal label,
and I'm going to keep track
of the users that they've chosen.
So my design has a little icon here, right?
This is not an input.
It's not a checkbox.
It's just a visual icon.
The user is going to click.
And so when they click on this icon,
they're going to add that user.
Let's color code these as well.
They're going to add that user
to the list of selected users.
Okay, let me go back to this folder here.
So click on this icon.
I'm going to set the state
of my repeating group,
users selected.
Okay, this is a list of users.
And the way that I'm going to do this
is I'm basically appending that user to this list.
Whether they're the first user
or they're the third, fourth, fifth,
I need to take the existing list first.
So I'm going to say repeating group users selected.
I don't want the list of users.
That's the full list that we're seeing out here.
I want to take the current selected,
and then I'm going to add,
by using plus item,
add the parent group's user,
the parent group referring to the cell's user.
This icon is actually sitting inside of a group,
which is also sitting inside of the cell.
Let me just show you right here.
This icon is inside of this group
that contains the icon and the name,
and that group is inside of the cell.
So this group is just referring to the cell's user.
That's why we see parent group's user
being added here versus current cell's user.
So I'm updating the state, right?
I click on the icon,
and I'm updating the selected state to say,
okay, take everybody who's currently selected.
Now add this new user.
Now, I only want this to happen
if the user isn't already in the list.
What if I want to deselect the user?
Well, I need to do the opposite, right?
If I want to remove them from the list,
I need to minus them.
So let's add a condition on this first.
Only when the repeating group's user's selected
doesn't contain the parent group's user.
If the selected list doesn't already contain the user,
we're going to add them.
Now, I'm going to copy this event
and paste it to do the opposite.
If it already contains the user,
then the action is going to remove them.
We're going to do minus item.
So we can toggle back and forth
between adding the user
and subtracting the user
from our custom state list selected,
which is our list of selected users.
Now, again, clicking on the icon
and going through that logic
will update the state as intended,
but we do need to give the user some visual cue
that things are happening,
that that state either contains the user or not, right?
The icon itself is not reacting visually to that state.
So let's help the user understand what's going on.
It's at a condition to change the appearance of the icon.
So I'm going to say,
when the repeating group's selected,
with all of these states here for the repeating group,
the selected contains the parent group's user,
then we're going to change the icon to a check.
Right?
And it'll look like this.
I'm going to toggle this on
so we can see the preview.
This does not enable the condition.
It's just a preview for the appearance change.
And I'm also going to go ahead
and change the color of the icon to green.
Like that.
That's pretty bright.
Let's actually change it to a darker green.
Yeah, like that.
Okay.
So the default appearance of the icon
is basically the deselected state,
and then the condition changes the appearance
if the user exists in this selected.
Remember, this selected is not in our database.
It's just in our temporary value list.
So let's refresh the page
and see how the icons change
as I select these different users.
All right.
So I'm going to select Ross
and see how the icon changed immediately.
Joseph, Chandler, Phoebe.
And if I deselect,
so click on Phoebe again,
click on Joseph,
right click on Ross.
All it's doing is changing the state
to add and remove them from that list of users.
It's not updating anything with my raw data.
It's just kind of creating a separated segment.
It's like a bookmark of users
that I just want to keep track of.
Right?
Like this.
I can also reference this state in my text element
by just kind of showing the number of people
that I've selected.
So, you know, before my static text there,
I can insert dynamic data,
go to my repeating groups,
selected, which is a list of users,
right?
A list of users.
That's not a text that can be printed,
but I can go to the count of the selected users.
So it can show me the number, right?
It's going to refresh the page
and take a look at this.
Remember, I told you it's a temporary value.
If I refresh the page,
the selected list is going to go away.
It's not going to be saved anywhere.
So it's going to revert back
to all deselected users.
All right.
So you see here, zero selected users.
If I select a few,
it's just kind of,
it's just counting all of my people, right?
That means I can go through that all day long.
Now, my email action is just to show you
that you can now take this value
and do whatever you want with it.
You can, again,
you can technically save things
to the database from here.
Let me put this in the right place here
so we can get to it.
You can create things,
you know, per user that was selected.
In my case, I'm going to send an email.
To my selected users.
So we're going to choose, again,
the repeating groups users selected.
And then I'm going to go to their email address.
Bubble will comma separate that list
for me automatically.
And so this email will go out to all of them.
Just like that.
If I wanted to display the list
of all of the users,
for example, selected users.
This, I can, again, reference.
Groups user selected
and then show their full name.
And it's just going to show the list
of users.
I can also make a change
to all of those users.
Take a change to a list of users here.
The list to change is the value
of my custom state.
And I can modify whatever I want.
So as you can see,
there are many different use cases
for custom states.
All it is, is a value.
And it's a temporary value.
So it's mostly used to help support
visual interactions,
maybe to help support
pre calculations
where you don't necessarily need to save
every step of the way in the database.
You can manipulate these values
just like you can
from any other dynamic data source.
I encourage you to use them
and get comfortable with them.
Start simple.
Some of the most common use cases
are things like this,
where you're tabbing between different groups.
Right.
Or you're working with selections.
You can use states
as a way to toggle things on and off.
Right.
You click on a button
and you change a state from yes to no.
That can disable things
versus enable things.
Or it can show something
versus hide something.
You don't have to rely on toggle inputs
or checkboxes.
You can use regular buttons or icons
and create more custom designs
for these things and leverage states
to help you keep track of specific values.
All right, everyone.
Happy building.
