htmx VS Stimulus

Compare htmx vs Stimulus and see what are their differences.

htmx

</> htmx - high power tools for HTML (by bigskysoftware)

Stimulus

A modest JavaScript framework for the HTML you already have (by hotwired)
Our great sponsors
  • Syncfusion - See why our products are consistently getting 4.6 out of 5 stars by your peers.
  • Nanos - Run Linux Software Faster and Safer than Linux with Unikernels
  • Scout APM - A developer's best friend. Try free for 14-days
htmx Stimulus
123 40
4,725 10,934
7.8% 2.2%
9.4 8.6
about 22 hours ago 15 days ago
JavaScript TypeScript
BSD 2-clause "Simplified" License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

htmx

Posts with mentions or reviews of htmx. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-10-16.
  • My goodness this is so cool
    reddit.com/r/Supabase | 2021-10-27
  • Ask HN: Front end web app development tools for back end engineer
    news.ycombinator.com | 2021-10-27
  • Learning Javascript after Python
    Have a look: "> htmx - high power tools for html" https://htmx.org
  • The JavaScript ecosystem is a hot mess and so is software development in general
    news.ycombinator.com | 2021-10-16
    I work on a dependency-free, build-less library called htmx:

    https://htmx.org

    It's more an extension of HTML than a JS library. It might be a good way to gently introduce more dynamic behavior without blowing out the complexity of your site.

  • Should I ditch using Django
    reddit.com/r/startups | 2021-10-16
    As an additional advice, I would check the Django subreddit and ask what are they doing for their front-end needs (e.g. check this one) -> you don't have to use JS for front-end (e.g. check htmx, unicorn, etc).
  • The Decline of Django
    news.ycombinator.com | 2021-10-15
    I think the case for server-side HTML rendering has never been stronger, and of all Django projects I work on, the ones I enjoy most are those that never got on the SPA bandwagon. From both a developer and user point of view I find them much faster and less painful. There are many cases where you really, really don't need the massive amount of extra complexity involved in designing APIs, adding JS frameworks etc.

    When you need a bit of extra UI goodness, [htmx](https://htmx.org/) is a fantastic solution, and you can still use SPA-type approaches for things that need them.

    You can also benefit from massively faster (and more reliable) functional testing when you are mostly standard HTML - see [django-functest](https://github.com/django-functest/django-functest/) for an example of this.

  • Has anyone written a small framework to support HTMX?
    reddit.com/r/golang | 2021-10-14
    See: https://htmx.org/
  • How Laravel Livewire works (a deep dive)
    news.ycombinator.com | 2021-10-12
    I recently started using htmx (https://htmx.org/) in combination with Django and have become a firm believer of sending HTML 'over the wire' instead of JSON structures that then get used client side.
  • I built a modern website in 2021
    news.ycombinator.com | 2021-10-10
    Curious - why aren’t simpler frameworks like htmx (https://htmx.org/) more common or
  • Ask HN: Why aren’t frameworks like htmx more popular?
    news.ycombinator.com | 2021-10-10
    shifting to htmx [1] or related “simpler” libraries?

    [1] https://htmx.org/

Stimulus

Posts with mentions or reviews of Stimulus. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-10-19.
  • Upgrade to Stimulus 3, say bye to IE11, and celebrate 🎉
    dev.to | 2021-10-19
    Most of our application JavaScript code is already written as Stimulus controllers, the rest being slowly assimilated or removed. Recently, we wanted to upgrade the Stimulus framework to version 3 to gain access to the new cool features, such as:
    dev.to | 2021-10-19
    To our surprise, we hit a weird and at first confusing error during the Stimulus upgrade process: Uncaught (in promise) TypeError: class constructors must be invoked with 'new'". No controllers worked at all. We double-, triple-checked the configs and all seemed OK. The solution clicked after we read this response on Stack Overflow. Our JS code was transpiled to ES5 but Stimulus itself now uses ES6 as the compile target. So our ES5 controllers could not extend ES6 Stimulus classes.
  • Lazy Load Content in Rails from Scratch
    dev.to | 2021-10-17
    We could just use vanilla JavaScript instead of Stimulus, but Stimulus pairs nicely with Rails and will make it easy to get up and running with this feature quickly.
  • Turbo Frames on Rails
    dev.to | 2021-10-09
    These events (added in Turbo 7.0.0-rc2) fire each time a frame is loaded or reloaded. Developers can use these events to attach behavior to an element within a frame or animate the entry of a frame element, and they pair nicely with Stimulus.
  • Stimulus.js 3.0
    news.ycombinator.com | 2021-09-26
    I wish they would change the default font on the Hotwire/Stimulus Reference pages from "Bitter" to something a bit darker, e.g., "Jost".

    https://stimulus.hotwired.dev/

  • We Got to LiveView
    news.ycombinator.com | 2021-09-22
  • Server-rendered modal forms on Rails with CableReady, Mrujs, Stimulus, and Tailwind
    dev.to | 2021-09-09
    To accomplish this, we’ll use Stimulus for the front-end interactivity, CableReady’s brand new CableCar feature to send content back from the server, and Mrujs to enable AJAX requests and to automatically process CableCar’s operations.
  • A Rails template for modern, reactive applications
    dev.to | 2021-09-02
    Stimulus
  • How to combine Rails's Ajax support and Stimulus
    dev.to | 2021-08-27
    Rails's UJS (Unobtrusive JavaScript) and Stimulus on the client side. UJS is a library builtin inside Rails that powers JavaScript interactions on the DOM via Rails special helpers, like link_to or button_to.
  • Create tidy front-end components for server-side rendered markup - introducing Ovee.js framework.
    dev.to | 2021-08-25
    In late 2019 I had a chat with some team members, that it would be good to finally ditch the jQuery and also switch from our proprietary pjax clone to Barba for page transitions. When doing my research, I found Basecamp’s Stimulus (https://stimulus.hotwired.dev/) - now part of Hotwire suite. I love the work of these guys, but I don’t like how much JS-related stuff (e.g. binding events) is done in the server-side rendered markup. There’s also Strudel.js (https://strudel.js.org/), which comes from a similar background to ours. When I started to modernize our framework, I’ve found a lot of inspiration in Strudel’s design and API (kudos to the team behind this pastry-flavored framework).

What are some alternatives?

When comparing htmx and Stimulus you can also consider the following projects:

Alpine.js - A rugged, minimal framework for composing JavaScript behavior in your markup.

react-snap - 👻 Zero-configuration framework-agnostic static prerendering for SPAs

Turbolinks - Turbolinks makes navigating your web application faster

django-unicorn - The magical reactive component framework for Django ✨

turbo - The speed of a single-page web application without having to write any JavaScript

phoenix_live_view - Rich, real-time user experiences with server-rendered HTML

svelte-query - Performant and powerful remote data synchronization for Svelte

hotwire-rails - Use Hotwire in your Ruby on Rails app

intercooler-js - Making AJAX as easy as anchor tags

budibase - Budibase is an open-source low code platform that helps you build internal tools in minutes 🚀

django-htmx - Extensions for using Django with htmx.

django-tables2 - django-tables2 - An app for creating HTML tables