Replies: 2 comments
-
|
It would be great to have an 'outside' event. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Put this PR together, hope that is ok. #695 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
The action options and global listeners are incredibly powerful. However, it would be great to fill in a common use case gap of an event that triggers only when outside the element is clicked.
Example use cases include focus traps, tooltips that close when something else it focused or clicked on, modals that can close when the user clicks outside the modal, dynamic form behaviour where blur is not suitable.
Proposed usage
Alternative solutions
Links
outsidedirective https://alpinejs.dev/directives/on#outsideBeta Was this translation helpful? Give feedback.
All reactions