Join the Webstudio community

Updated 4 months ago

Styles applied based on database content result

At a glance
I'm pulling text ("Easy", "Medium", "Hard") from a database. I want to apply Webstudio tags to style the results based on the value. Basically: Easy = green, Medium = yellow, Hard = red. How would you do this?
Example image:
Attachment
Screenshot_2024-10-04_at_3.51.43_PM.png
B
v
4 comments
You can bind your data to "Show" property on three instances with different styles
Thanks @TrySound . I see there is an expression editor tied to the show property. How would you do this? If not null then show? Not sure of the syntax here. Thanks.
Thanks! I'll check it out.
Add a reply
Sign up and join the conversation on Discord