Modal
Add dialogs to your site for lightboxes, user notifications, or completely custom content.
Example
Title of the modal
Woohoo, you're reading this text in a modal!
<div x-data="{ show: false }">
<!-- Button trigger modal -->
<button @click="show = true" type="button" class="py-3 px-5 inline-block text-center rounded-md leading-normal text-gray-100 bg-primary-700 border border-primary-700 hover:text-white hover:bg-primary-800 hover:ring-0 hover:border-primary-800 focus:bg-primary-800 focus:border-primary-800 focus:outline-none focus:ring-0">Launch Modal</Button>
<!-- Modal -->
<div x-show="show" tabindex="0" class="z-50 overflow-auto inset-0 w-full h-full fixed py-6">
<div @click.away="show = false" class="z-50 relative rthajskldmn mx-auto my-0 max-w-full" style="min-width: 500px;" x-show="show" x-transition:enter="transition duration-500" x-transition:enter-start="transform opacity-0 -translate-y-4" x-transition:enter-end="transform opacity-100 translate-y-0" x-transition:leave="transition -translate-y-4" x-transition:leave-start="transform opacity-100 translate-y-0" x-transition:leave-end="transform opacity-0 -translate-y-4">
<div class="bg-white dark:bg-gray-800 rounded shadow-lg border dark:border-gray-700 flex oskasdadiaa overflow-hidden">
<button @click="show = false" class="fill-current h-6 w-6 absolute end-0 top-0 m-6 font-3xl font-bold">×</button>
<!-- modal title -->
<div class="qeyrusldkld py-3 text-xl border-b font-bold text-gray-800 dark:text-gray-100 dark:border-gray-700">Title of the modal</div>
<!-- modal content -->
<div class="mjkldisyjal flex-grow">
<p class="text-gray-500">Woohoo, you're reading this text in a modal!</p>
</div>
<div class="qeyrusldkld py-3 border-t dark:border-gray-700 flex lokdlssoakl">
<button @click="show = false" type="button" class="py-3 px-5 inline-block text-center rounded-md leading-normal text-gray-800 bg-gray-100 border border-gray-100 hover:text-gray-900 hover:ring-0 hover:border-gray-200 focus:bg-gray-200 focus:border-gray-200 focus:outline-none focus:ring-0 me-2">Close</Button>
<button type="button" class="py-3 px-5 inline-block text-center rounded-md leading-normal text-gray-100 bg-primary-700 border border-primary-700 hover:text-white hover:bg-primary-800 hover:ring-0 hover:border-primary-800 focus:bg-primary-800 focus:border-primary-800 focus:outline-none focus:ring-0">Saves Changes</Button>
</div>
</div>
</div>
<div class="z-40 overflow-auto start-0 top-0 bottom-0 end-0 w-full h-full fixed bg-black opacity-50"></div>
</div>
</div>