Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

sakarya's avatar

Alpine JS Modal doesn't open

I'm using Laravel Breeze. I've implemented a breeze modal component for confirmation.

< x-danger-button x-data="" x-on:click.prevent="$dispatch('open-modal', { name: 'confirm-feature-deletion', featureId: {{ $feature->id }} })"> {{ __('admin/plans/features.deleted.table.forcedelete.link') }} </ x-danger-button>

I use this button to trigger the modal opening. However, it doesn't seem to function as expected.

Here's the modal structure:

< x-modal name="confirm-feature-deletion" maxWidth="sm" focusable> < form x-data="{ featureId: null }" x-on:open-modal.window="featureId = $event.detail.featureId;" method="post" :action="'{{ route('panel.plans.feature.forcedelete') }}'" class="p-6"> ... </ x-modal>

The modal code itself follows this structure.

What might be the reason for this issue?

0 likes
5 replies
jlrdw's avatar

What is happening in network tab.

jlrdw's avatar

@sakarya sorry inpsect not network, is any thing changing or showing up.

sakarya's avatar

@jlrdw I added console.log("clicked"); to the button. I see it every time I click the button.

Please or to participate in this conversation.