Hi @jackmielke,
Thanks for getting in touch.
You can use element binding to achieve this, you can find more about it at Querying state in css.
Other ways could be to use custom code to define CSS classes and use JS code to dynamically select them. You can find more about it at Adding custom code in the Builder.io visual editor - Builder.io
Let us know if you have any further questions. Thank you!