Join the Webstudio community

Updated 4 weeks ago

Is there a smart way to build "color swatches" in Ws?

Like this:
Attachment
Screenshot_2024-09-25_at_14.46.59.png
O
c
B
21 comments
currently by using tokens, as a way to manage these, I would create a palete yourself on a style guide page
And the functionality?
It´s supposed to be a form element where you select a color (or whatever else)
in the future you would rather use css variables for that
but until we have that released, tokens is the way to go
I don´t understand
How can a user select a colour and I receive that via a form?
What to tokens have to do with that?
I think I misunderstood your use case
what are you trying to build, please explain from scratch
Just a form basically.
At one point the user selects the desired color
It´s supposed to look like the above image
Like a color picker
Or an example from temu where you select an image instead of a color:
Attachment
Screenshot_2024-09-25_at_15.35.30.png
I see, that's probably a bunch of radio boxes where you color them
if you add a submit button and form, that would post the color choice and you could use it just like a filter we explained in the videos
so using url and system variable
other options are using js
but you can´t edit a radio like that, it´s always just that small circle
you can if you use radix radio, which is there for cases like this - full customization
Works like butter
Add a reply
Sign up and join the conversation on Discord