Live data from Hacker News

Htmx – high power tools for HTML

htmx.org

91–100 of 175 posts

Re: Htmx – high power tools for HTML

#91

hello, I'm the creator of htmx (and originally intercooler) I just released 0.0.4, so htmx is still very young, but it's got a decent test suite: https://htmx.org/test/0.0.4/test/ there is a nice extension mechanism: https://htmx.org/extensions/ and some very rough docs on how to pull off pure HTML animations: https://htmx.org/examples/animations/ happy to answer questions

On the click-to-load example

https://htmx.org/examples/click-to-load/

I see no network traffic when I click the 'load more agents' button. Am I missing something, where are the requests going?

Re: Htmx – high power tools for HTML

#92

Earlier quoted context omitted.

You could check out the client side templates extension: https://htmx.org/extensions/client-side-templates/

This is great, I am definitely considering using this for some of my side projects so I don't spend hours with JS just to display some JSON output as HTML.

Add tailwind css or another utility class css framework and you can do the whole frontend in html :)

Re: Htmx – high power tools for HTML

#96
post #6

For similar-goal prior-art, see Unpoly[1]. Also the IETF asks[2] that you please stop using "X-" to prepend your custom HTTP headers[3] [1] https://unpoly.com/tutorial [2] https://tools.ietf.org/html/rfc6648 [3] https://htmx.org/reference/#headers

My upvote for Unpoly. Used it in severa projects and it's awesome. Only drawback I've found so far is that the source is CoffeScript, so it might be a bit harder to read the internals when necessary.

But In my opinion it gets a lot of things right, specially around form submissions, validation, error handling, modals, history, navigation, passive updates, etc. It is like Turbolinks++.

Re: Htmx – high power tools for HTML

#97
post #69

This looks amazing -- seems like you can accomplish a significant amount of what constitutes front-end work these days with htmx. The examples are compelling: https://htmx.org/examples/ There is a slight deal-breaker for me. Much of the functionality revolves around hx-swap'ing i.e. writing the contents of a response as HTML into/around tags. This requires the server-side to return HTML instead of JSON. From the docs…

> How does one use this for AJAX without rewriting existing backends?

I've never actually used a backend that couldn't return arbitrary content types. Those exist?

Re: Htmx – high power tools for HTML

#98
post #92

Earlier quoted context omitted.

This is great, I am definitely considering using this for some of my side projects so I don't spend hours with JS just to display some JSON output as HTML.

Add tailwind css or another utility class css framework and you can do the whole frontend in html :)

Yes, but you shouldn't use it as a simple drop-in. The minified version via CDN is like 1.7 MB ... at least they mention you should not use it in the docs and instead configure it to your needs.

Re: Htmx – high power tools for HTML

#99
I like it, though I guess the "implementation" for what JavaScript gets executed on a given custom HTML attribute set is "hardcoded" in the htmx lib. With SGML, OTOH, you can have your own replacement content (JavaScript, other HTML, or whatever; it's just syntactical replacement). Would be an interesting experiment to implement the htmx vocabulary on top of SGML.

Re: Htmx – high power tools for HTML

#100

hello, I'm the creator of htmx (and originally intercooler) I just released 0.0.4, so htmx is still very young, but it's got a decent test suite: https://htmx.org/test/0.0.4/test/ there is a nice extension mechanism: https://htmx.org/extensions/ and some very rough docs on how to pull off pure HTML animations: https://htmx.org/examples/animations/ happy to answer questions

What about accessibility? It'd be great to see the docs and examples put more focus on accessibility, both for non-JS clients and for clients that may be better served by not replacing elements, like screen readers.

And, based on some of the comments here, it seems like some people may have forgotten how to do anything that doesn't depend on AJAX. ;-)

Post reply on HN