swup VS htmx

Compare swup vs htmx and see what are their differences.

swup

Versatile and extensible page transition library for server-rendered websites 🎉 (by swup)

htmx

</> htmx - high power tools for HTML (by bigskysoftware)
Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
swup htmx
17 565
4,428 32,443
1.2% 5.9%
9.7 9.6
7 days ago 2 days ago
TypeScript JavaScript
MIT License GNU General Public License v3.0 or later
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.

swup

Posts with mentions or reviews of swup. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-19.
  • The Subtle Case For and Against React
    3 projects | dev.to | 19 Apr 2024
    https://swup.js.org/ single-page-app but with minimal framework, still along for the feel of an SPA
  • Coming to grips with JS: a Rubyist's deep dive
    16 projects | dev.to | 29 Dec 2023
    Sure, you can use any number of JS-avoidance libraries. I'm a fan of Turbo, and there's also htmx, Unpoly, Alpine, hyperscript, swup, barba.js, and probably others.
  • [Swup] Has anyone used Swup with React
    1 project | /r/react | 29 Nov 2023
    Swup is this nice page transition library I found recently : https://swup.js.org/
  • Show HN: We built swup+fragment-plugin to visually enhance classic websites
    4 projects | news.ycombinator.com | 2 Aug 2023
    2. The newly released fragment-plugin [3] that provides a declarative API for dynamically replacing containers based on rules

    I can now finally build websites that tick all three boxes:

    1. Visually impressive, fun, and snappy by using swup's first-class support for animations[4], cache[5], and preload capacities[6], enhanced with fragment visits as seen on the demo site.

    2. Accessible by being able to serve server-rendered semantic markup that will fully work even with JavaScript disabled (try it out on the demo site!). On top of that, swup's a11y plugin[7] will automatically announce page visits to assistive technologies and will focus the new `

    ` element after each visit.

    3. Because now all I need for my fancy frontend is a bit of progressive JavaScript, I can choose whatever tool I like on the server, keeping complexity low and maintainability high. I can use SSGs like eleventy or Astro (the demo site is built using Astro!), I can use any CMS like WordPress or ProcessWire, or a framework like Laravel. And I don't have to maintain an additional node server for SSG!

    And all it took was 20 years! ;)

    [0] https://github.com/swup/swup

  • Animated transitions between sections
    2 projects | /r/webdev | 26 Jun 2023
  • How to use View Transitions in Hotwire Turbo
    10 projects | dev.to | 16 Feb 2023
    So what are View Transitions good for? In short, they allow adding animated page transitions. Although we already have several standard options to animate stuff on web pages (CSS Transitions, CSS Animations or the Web Animations API) and countless more options in particular JavaScript frameworks and libraries (Framer Motion for React, Vue Transitions, Svelte Transitions, Swup, Barba.js or Animate.css to name just a few), the web still lacks a generic, standards-based and easy-to-use solution to animate transitions between pages or during DOM updates. At least that’s what Google engineers say and I tend to agree with them.
  • Smooth Page Transitions in 2023
    4 projects | /r/webdev | 31 Jan 2023
    Is https://turbo.hotwired.dev/ my replacement? Or Swup.js?
  • Alpine.js
    17 projects | news.ycombinator.com | 13 Jan 2023
  • Is there any js library to add fluid "app-like" animations to a website?
    2 projects | /r/webdev | 28 Dec 2022
    I've used https://swup.js.org/. Simple to setup with one of the built in/contributed themes, haven't tried building a custom theme however. Also has a lot of good plugins for eg. accessibility. I used it in combination with Astro so a static site with a separate html file for each page.
  • Migrating my website from Gatsby to Astro
    13 projects | dev.to | 25 Nov 2022
    Like Gatsby or Next, Astro does not have any client side navigation. So each link click triggers a full page reload. Astro recommends to use Swup as mentioned here. Turbo is also another option though the team does not recommend it. I'm currently using Swup which I'll probably switch from or completely remove it as I have added TOC to MDX and clicking on a title is not redirecting the page to that particular section.

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 2024-03-31.
  • Reusable Input Datalist
    1 project | dev.to | 6 Apr 2024
    When I work with HTMX I need isolated component that can be reusable a form. So I create a PHP Function that generate the Input Datalist.
  • HTMZ inspired form subission
    2 projects | dev.to | 31 Mar 2024
    I was inspired by htmz (which was in turn inspired by htmx) and how the author got pretty close to a basic htmx-like experience just using an iframe. I wanted to push it a little further so whipped this demo together. My submission demonstrates progressive enhancement for the form - with js enabled the request targets an iframe that is inserted into the dom, meaning the page doesn't actually navigate (similar to event.preventDefault()). The iframe receives the html response from the request and on load triggers a function to swap out it's contents into the main page.
  • Example Java Application with Embedded Jetty and a htmx Website
    3 projects | dev.to | 28 Mar 2024
    As described on htmx.org: "htmx gives you access to AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypertext"
  • Show HN: ZakuChess, an open source web game built with Django, Htmx and Tailwind
    3 projects | news.ycombinator.com | 9 Mar 2024
    Apart from the source code itself, the repo's README also gives a bit more details about the various packages I used.

    1. htmx: https://htmx.org/

  • Show HN: Alpine Ajax – If Htmx and Alpine.js Had a Baby
    1 project | news.ycombinator.com | 4 Mar 2024
    Also, there’s some response header juggling you have to do when submitting forms that have a validation step before redirecting: https://github.com/bigskysoftware/htmx/issues/369

    I’ve tried to iron out any footguns or server requirements I’ve bumped into while using HTMX & Hotwire in my projects.

  • 🤓 My top 3 Go packages that I wish I'd known about earlier
    6 projects | dev.to | 1 Mar 2024
    ✨ In recent months, I have been developing web projects using GOTTHA stack: Go + Templ + Tailwind CSS + htmx + Alpine.js. As soon as I'm ready to talk about all the subtleties and pitfalls, I'll post it on my social networks.
  • FLaNK Stack 26 February 2024
    50 projects | dev.to | 26 Feb 2024
  • Go + Hypermedia - A Learning Journey (Part 1)
    6 projects | dev.to | 23 Feb 2024
    I've been digging into HTMX lately (using Python web frameworks) and find the concepts and approach to be interesting and promising. The idea of hypermedia driven systems over the current practice of JavaScript based frameworks (I never really got into React, played with Vue, and enjoy Svelte/SvelteKit) and the ability to chose your language/framework for the backend while primarily leveraging HTML/CSS on the frontend just seems refreshing.
  • Htmx become 0 clause BSD-licensed
    3 projects | news.ycombinator.com | 17 Feb 2024
    Apparently it changed from 2-clause BSD: https://github.com/bigskysoftware/htmx/commit/e16f1865a494b6...

    (The zero clause license drops the requirements for preserving the copyright notice when distributing)

  • Web frameworks we are most excited for in 2024
    5 projects | dev.to | 13 Feb 2024
    It would be a sin not to start with something that prides itself on being the front-end library of peace. HTMX skyrocketed in popularity in 2023, gaining most of its GitHub stars during the past year. HTMX is not your average JS framework. If you work in HTMX, you will spend most of your time in the world of hypermedia, looking at web development from a completely different pair of eyes as compared to our usual JS-heavy outlook on modern web development. HTMX leverages the power of the concept of HATEOAS (Hypermedia as the Engine of Application State), enabling developers to access browser features directly from HTML, instead of using Javascript.

What are some alternatives?

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

highway - Highway - A Modern Javascript Transitions Manager

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

highway - Performance-portable, length-agnostic SIMD with runtime dispatch

Vue.js - This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

single-spa - The router for easy microfrontends

astro - The web framework for content-driven websites. ⭐️ Star to support our work!

pjax - Easily enable fast Ajax navigation on any website (using pushState + xhr)

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

Mithril.js - A JavaScript Framework for Building Brilliant Applications

unpoly - Unobtrusive Javascript Framework for server-side applications

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

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