Join the Webstudio community

Updated 5 days ago

Extended Styling Options for RADIX Accordion Component States

If I could style the open state of the "Item" component according to my needs, I would have more control over its appearance. Currently, I can only style the open state of the "Item Trigger" element. Having the ability to work with "Item" states like hover, focus, or open would give me much more flexibility in customizing the component.

If I could style the open state directly on the "Item" element, I would be able to adjust aspects like color, border, or other visual properties of the open item.
Attachment
image.png
J
s
2 comments
Why can't you add your token to the "item content"? It will take those styles and only display when the item is open.
From what I understand, "item content" contains the content inside the accordion. As I mentioned, I would like to change the color of the entire "item" element when it is opened, so that closed "items" look different from the opened one. "Item content" only styles the content of the "item," unless I’m missing something. I would also like to add a hover effect to the closed "item." This can be done by wrapping it in a div, but not directly.
Add a reply
Sign up and join the conversation on Discord