A Toggle with open closed animation to show/hide content

There is any pre-made switch/toggle/checkbox element in Bricks to quickly set a simple interaction like show/hide element?.

The current options I see are:
Toggle: (doesnt features open/close natively)
Nav (Nestable): It’s not intuitive if is intended as a toggle.
Filter checkbox: This will be ideal, but it is attached t queries.

Other options are to set two icons that show and hide while clicking each other, while adding a show/hide interactivon to each one. (Not sure why the “Community templates” don’t have a little library of useful common tricks like this).

There is anything more straight? As I feel I’m missing something.

nested accordion ?

you can change every aspect of it and it just a toggle open close item.

you just need to set the default state closed and that’s it. multiple ways to do it easiest probably interaction removing the brx-open on first load

check this

1 Like

Thanks, I don’t see how nested accordion toggles the icon.

What I need is a toogle on the header of a product archive to switch the visibility of prices, release dates, and other fields on each product card along the grid.

Would be great to remove the contents of the nested accordion, and leave only the Title part with the Icon. Then assign an interaction to toggle visibility for the class of prorduct prices on the grid, but sadly I don’t see the nestable accordion has an automated way to toggle the icon from closed to open like the nestable navigation.

I’ve tried the code you’ve attached but it toggles all switch icons at once, I should write an array of classes and so on, and I don’t have much time. I miss somewhere where there are templates shared by the community with cases like this, for all the things that Bricks misses. I’m lazy to install Bricks extensions, as often crowd the database with tables, and I prefer to keep sites with minimal plugins for performance, maintenance and security reasons.