htmxxx – more explicit high power tools for HTML

1 month ago 1

HTMXXX

high power, explicit tools for HTML

Discord Netlify Bundlephobia Bundlephobia

HTMXXX is htmx's naughty alter ego—an explicit extension that lets you access AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, but with flirtatious attributes that add spice to your code. Build modern UIs with the simplicity and power of hypertext, but with a more explicit commands.

HTMXXX is small (~14k min.gz'd when bundled with htmx), dependency-free, and 100% drop-in compatible—your existing hx-* attributes work unchanged. Just add the fun ones for extra giggles in the console.

  • Why settle for boring hx-get when you can hx-flirt?
  • Why plain hx-post when hx-penetrate goes deeper?
  • Why not add some foreplay, climax, and afterglow to your requests?
  • Why should your AJAX be vanilla when it can be... explicit?

By removing the prude constraints and adding punny, explicit attributes, HTMXXX completes HTML as a hypertext with a naughty twist. It's htmx with extra thrust—perfect for sexy code reviews and spicing up dynamic UIs.

First, include htmx:

<script src="https://unpkg.com/[email protected]"></script>

Then, include HTMXXX:

<script src="https://unpkg.com/[email protected]"></script>

Process your page: htmx.process(document.body);

Now, have a button flirt via AJAX:

<button hx-flirt="/flirted" hx-gspot="outerHTML"> Flirt With Me </button>

The hx-flirt and hx-gspot attributes tell HTMXXX (and htmx underneath):

"When a user clicks this button, issue a flirty GET request to /flirted, hit the sweet spot by replacing the entire button with the response, and log some spicy console fun!"

HTMXXX maps to standard htmx behavior but with explicit names and humorous logs. It's the successor to... well, a late-night coding joke that got out of hand.

installing as a node package

To install using npm:

npm install htmxxx --save

Note: This is the official HTMXXX package. No broken aliases here—just pure spice.

HTMXXX v1.0.0 is now live on npm!

Want to contribute? Add more puns, fix bugs, or extend the troll factor! Check out our contribution guidelines.

No time? Then become a sponsor for the original htmx (and maybe this too).

To develop HTMXXX locally, install dependencies:

Run a web server in the root:

Navigate to http://0.0.0.0:3000/test/ to run tests.

Modify /src/htmx.js or add to the extension in /dist/ext/htmxxx.js, then add tests under /test.

HTMXXX uses the same testing setup as htmx: mocha, chai, and sinon.

javascript fatigue:
longing for hypertext
with explicit hand

Read Entire Article