Alpine dans Laravel Mix
// npm install alpinejs
//in resources/js/bootstrap.js file
window.Alpine = require('alpinejs');
Alpine.default.start();
Tiago F2
// npm install alpinejs
//in resources/js/bootstrap.js file
window.Alpine = require('alpinejs');
Alpine.default.start();
<div x-data="{ open: false }">
<button @click="open = true">Open Dropdown</button>
<ul
x-show="open"
@click.away="open = false"
>
Dropdown Body
</ul>
</div>