Replies: 1 comment
-
It would be nice to get this in as a first-class extension for HTMX 2 since it drops the IE 11 support. |
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
-
Hey!
To help a current project, I've written a little extension for htmx (see a replit) which handles basic status dialogs.
I was a little annoyed at how dialogs were suggested in the examples, and I thought why can't it work like this?
It builds a modal container, handles a loading spinner and then displays a dialog as a modal with a cancel button.
The reason is that while the
<dialog>
element in html really needs JS to be able to use it fully, and it's not neat when it comes to displaying loading, it should really be 'the way' to do dialogs, but because<dialog>
has only been cross-browser since 2022 we have a mess of every library implementing their own way around it. I saw the dialog examples on htmx.org and wanted to see something use the native<dialog>
.I could extend it, (handle failed requests, customisation, non-modals, bunny rabbits dancing on the back of unicorns) but I've not really read enough of the book, and don't have a solid feeling on whether this sort of extension feels like it 'belongs' in htmx, (I just wanted to see how building extensions worked).
Worth continuing?
Beta Was this translation helpful? Give feedback.
All reactions