Mahmoud Al-HabashOpen to new projects
  • WorkWork
  • ServicesServices
  • LabLab
  • WritingWriting
  • ContactContact
Amman--:--عربي
Writing/Livewire

Wire Actions: click, submit, keydown in Livewire v4

Handle user interactions with wire directives.

1 February 20261 min readLivewireاقرأ بالعربية

On this page

  1. Click Events
  2. Keyboard
  3. Modifiers

Livewire v4 provides intuitive event handling.

Click Events

blade
<button wire:click="save">Save</button>
<button wire:click.prevent="submit">Submit</button>

Keyboard

blade
<input wire:keydown.enter="search">
<input wire:keydown.escape="close">

Modifiers

.prevent - preventDefault()
.stop - stopPropagation()
.throttle.500ms - throttle calls
All articles

Keep reading

  • Authorization in Livewire v4 Components1 February 20261 min read
  • Blaze Pre-Compiler: Massive Performance Gains in Livewire v41 February 20261 min read
  • Building a Bookmark Feature with Livewire v41 February 20261 min read