Implement x-model for <dialog> and <details> elements #4723
loilo
started this conversation in
3. Feature Ideas
Replies: 0 comments
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.
-
We've had
x-modelin various input elements forever, but in recent years, there have been new elements carrying state as well.<dialog>and<details>are prime examples. They have methods to toggle them and emit thetoggleevent when their state was changed through user interaction.Dialog Basic Example
Before:
After:
Dialog Example with 'modal' modifier
Before:
After:
Details Example
Before:
After:
It's not a world-bending change, but it's a nice improvement in developer ergonomics which should be implementable with a relatively low amount of code.
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions