Problems building components

In Stacks, I had the ability to to use jQuery and change from anywhere the visibility of a DOM element. So for the activators/triggers I want it to have very generic usable, just like using JS to manipulate the CSS properties of this div containers.

For the containers: I will have all dropzones at the same place. So it hides/shows them just like switching the content inside a container.

At least I got the element itself working now without errors. So I can go on. @ben any recommendations on how to proceed would be fine.

Sounds like you want a something like a “tabs” component that enables the user to show and hide content?

We don’t include jQuery in Elements, for a number of reasons. We do include Alpine.js, which I would suggest taking a look at for doing anything dynamic with DOM elements.

If you want to show/hide things inside of Elements, you’ll need to check the value of a component property — likely you’ll want to use a Switch, Segmented, or Select control.

You’ll then need to write some logic in your hooks.js to decide which container to show and when.

I’ve created a custom “Content Switch / Tabs” component that does what I’ think you’re trying to do. Open the project in Elements and take a look, hopefully that helps :slight_smile: