$el
is a magical property that has multiple
useful methods for some components.
Allows you to open/show the dialog or component drawer from other components.
Allows you to close/hide the dialog or component drawer from other components.
Allows you to open/show-close/hide the dialog or component drawer from other components.
<!-- dialog -->
<button x-on:click="$nui.open('my-dialog')">Open dialog from outside</button>
<div x-dialog x-nui:id="my-dialog">
<div x-dialog:backdrop></div>
<div x-dialog:panel>Panel content</div>
</div>
<!-- drawer -->
<button x-on:click="$nui.open('my-drawer')">Open drawer from outside</button>
<div x-drawer x-nui:id="my-drawer">
<div x-drawer:backdrop></div>
<div x-drawer:panel>Panel content</div>
</div>