I am looking to create a button which, when clicked, changes the background color and text color of the button itself.
The idea is to signify to the end-user that the button has been activated.
How can I achieve this?
I am looking to create a button which, when clicked, changes the background color and text color of the button itself.
The idea is to signify to the end-user that the button has been activated.
How can I achieve this?
Hi @speedymua
You could go about it this way:
clicked
variable of “Boolean” type that is false
by defaultclicked
state on the buttonclicked
state to the clicked
variableclicked
variable to true
Style the button and text differently when the state is the default state or the clicked
state.
Here’s a video that explains how to add custom states in WeWeb.
Does that help?
Hey @Joyce,
Sorry for a shameless dig out.
How would one go about changing the ‘clicked’ style of a dynamically rendered item coming from a collection? I have a list of items, styles should go back to its normal state when the other item is clicked and so on.
Thanks in advance!