htmx/www/index.md
carson fe9dbb8b3e lots of work:
* reworked the swap code did away with merge in favor of general attributes swapping
* updated docs
* changed hx-swap-direct to hx-swap-oob
* updated build script to create a .gz so I can know what size that is
* cleaned up code so it's easier to follow
2020-05-04 17:55:19 -07:00

867 B

layout title
layout.njk HTMx - HTML Extensions

Introduction

HTMx is a small (<12Kb) & dependency-free library that surfaces the features of modern browsers using HTML attributes. Using HTMx you can implement many UX patterns that would typically require writing javascript.

HTMx is unobtrusive, plays well with other tools, can be adopted incrementally with no up-front rewrites.

Quick Start

    <!-- Load from unpkg -->
    <script src="https://unpkg.com/htmx.org@0.0.1"></script>

    <!-- enhance a button -->
    <button hx-get="/example">Click Me</button>

This code tells HTMx that:

"When a user clicks on this button, issue an AJAX request to /example, and load the content into the body of the button"

HTMx is based on intercooler.js and is the successor to that project.