# Problems building components

**URL:** <https://forums.realmacsoftware.com/t/problems-building-components/50354>\
**Category:** Elements\
**Created:** [August 29, 2025, 2:31pm UTC](https://forums.realmacsoftware.com/t/problems-building-components/50354 "2025-08-29T14:31:55Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![barz-stacks](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/barz-stacks/32/3644_2.png) [@barz-stacks](https://forums.realmacsoftware.com/u/barz-stacks)\
**Post date:** [August 29, 2025, 8:13pm UTC](https://forums.realmacsoftware.com/t/problems-building-components/50354/22 "2025-08-29T20:13:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![barz-stacks](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/barz-stacks/32/3644_2.png) [@barz-stacks](https://forums.realmacsoftware.com/u/barz-stacks)\
**Post date:** [August 29, 2025, 10:24pm UTC](https://forums.realmacsoftware.com/t/problems-building-components/50354/23 "2025-08-29T22:24:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ben](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/ben/32/28488_2.png) [@ben](https://forums.realmacsoftware.com/u/ben)\
**Post date:** [August 30, 2025, 1:48pm UTC](https://forums.realmacsoftware.com/t/problems-building-components/50354/24 "2025-08-30T13:48:39Z")

</div>

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

> [@barz-stacks](#):
>
> I had the ability to to use jQuery and change from anywhere the visibility of a DOM element

We don’t include jQuery in Elements, for a number of reasons. We do include [Alpine.js](https://alpinejs.dev), 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](elementsapp://downloadDocument/exZmQFx61ypM) and take a look, hopefully that helps 🙂

[Previous page](https://forums.realmacsoftware.com/t/problems-building-components/50354.md?page=1)
