The small library for behaviour written straight into the markup is already loaded, both on the site and in the panel. There is no need to write a separate script for a dropdown or a toggle.
<div x-data="{ open: false }">
<button @click="open = !open">Show</button>
<div x-show="open">Content</div>
</div>⚠️ Never add it with a second tag: two instances initialise the markup twice, and every list is rendered in double. That is exactly what once happened — the search box showed eight suggestions instead of four.
Discussion
0Only signed-in visitors can comment. Sign in to write.
Nobody has spoken up yet. Be the first.