Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
alpinejs close popup
<div x-data="{ show: !localStorage.getItem('hide-popup') }">
<div x-show="show">
<button @click="localStorage.setItem('hide-popup', true); show = false">
close
</button>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment