Files
email-organizer/offline-docs/alpinejs/magics/el.md
2025-08-13 09:33:19 -07:00

488 B

Alpine.js Documentation - Magics

Magics are special properties that are available inside Alpine expressions. They provide convenient access to common functionality.

$el

$el is a magic property that can be used to retrieve the current DOM node.

<button @click="$el.innerHTML = 'Hello World!'">Replace me with "Hello World!"</button>

← x-id

$refs →

Code highlighting provided by Torchlight