3 ms·
Why do you feel the need to use lit-html? Just interested in the use-case.
by piranha 3y ago
Why do you feel the need to use lit-html? Just interested in the use-case.
- megaman821 3y agoI am not the original poster, but I use lit-html to make the interactive elements on the page like tabs and modals. Then I use HTMX to load the contents of those elements when the tab or trigger is clicked.
- piranha 3y agoThat's one of the reasons TwinSpark got actions, you still need little bits of client-side interactivity.
- megaman821 3y agoI find things like actions is great for conditionally showing and hiding form fields or small things like that, but if you want to have accessible tabs and modals it is best to bundle it up in a component. Here is an example of a lit components I use, https://codepen.io/megaman821/pen/GRXmzZb https://codepen.io/megaman821/pen/GRXmzZb and https://codepen.io/megaman821/pen/dydvxBE https://codepen.io/megaman821/pen/dydvxBE