Developers of htmx will resist new features, focus on stability and extensions

Developers of htmx will resist new features, focus on stability and extensions

The team behind htmx, a JavaScript library which extends HTML, will prioritize stability over new features and add most new functionality via extensions, according to a new post laying out the future of the project. 

Carson Gross, htmx creator, and Alex Petros, from the htmx core team, said that they would be “inclined to not accept new proposed features in the library core,” though they may be considered when new browser functionality becomes available. Most new capabilities will be added via the html extensions API, and may come from the core team or the community.

Gross and Petros praised jQuery, which despite being treated as legacy software is used on 75 percent of active websites, far more than any other JavaScript library. The reason, they said, is the stability of its API, how it is easy to add it to a project with a single link, and the fact that it does not interfere with the rest of the code. They hope for similar success for htmx, by following these principles.

The statistics referenced by Gross and Petros for jQuery also mention htmx, but only to list it as having a tiny market share of less than 0.1 percent. Despite that small share, it has attracted attention as a return to the core concept of HTML and an alternative to the complexity introduced by huge JavaScript frameworks. 

A new JavaScript survey, based on stars added to GitHub projects, placed htmx top in front-end frameworks and sixth in overall popularity, a significant vote of confidence, though noting GitHub stars are not always reliable.

Popular JavaScript frameworks as measured by stars awarded to their GitHub repositories

Although there is enthusiasm for the project and its ideas, some developers have found the implementation lacking. One developer migrated away from htmx to Basecamp’s Hotwire, remarking that the htmx library is “a single 5k line file with 190 top level functions in it meaning it’s pretty impenetrable to get up to speed on.” One of the consequences is that the impact of changes is hard to test. “The single file is a DX we’ve chosen, and it has both costs and benefits,” said Petros in reply.

Another area of doubt is htmx accessibility. “I want to be 100 percent confident that I understand how to get htmx sites to work well with screen readers,” said Simon Willison, co-creator of the Django web framework. 

Petros said that accessibility is “in-scope for htmx” and that “it’s basically possible to do this in a backwards-compatible way (first as an extension) that aligns with the maintenance strategy.”

Most developers, though, like the idea of stability being preferred over new features, and many also like the concepts behind htmx. The library has yet to achieve widespread usage, but there is no doubting its influence.