Open daily from 9:00 to 20:00Get in touch
NewWe collected answers to the questions people ask most oftenOpen the section →
🍪 Cookies and personal data

We use cookies to keep the site working and make it more convenient, and we process anonymised data about your visit. The details are in our privacy policy.

Alpine: where it is already loaded and how to use it

31.08.2026 ~1 min read
Alpine: where it is already loaded and how to use it

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.

More lessons in this course

Discussion

0

Only signed-in visitors can comment. Sign in to write.

Nobody has spoken up yet. Be the first.

Still have questions?We reply within one business day — write to us whichever way suits you.
Contact us