UNPKG

1.32 kBMarkdownView Raw
1![</> htmx](https://raw.githubusercontent.com/bigskysoftware/htmx/77cc4ba1798750fc6469ae1659baffe2c945ad8f/www/img/htmx_logo.1.png "high power tools for HTML")
2
3*high power tools for HTML*
4
5## Introduction
6
7htmx is a set of extensions (attributes, request headers, etc.) that help you build
8[modern UI](https://htmx.org/examples) with the [simplicity](https://en.wikipedia.org/wiki/HATEOAS) and
9[power](https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm) of HTML.
10
11Htmx is small ([~6k min.gz'd](https://unpkg.com/htmx.org/dist/)), IE11 compatible, [dependency-free](https://github.com/bigskysoftware/htmx/blob/master/package.json)
12& you can try it out quickly, without a huge rewrite.
13
14## Quick Start
15
16```html
17 <!-- Load from unpkg -->
18 <script src="https://unpkg.com/htmx.org@0.0.3"></script>
19 <!-- have a button POST a click via AJAX -->
20 <button hx-post="/clicked" hx-swap="outerHTML">
21 Click Me
22 </button>
23```
24
25The `hx-post` and `hx-swap` attributes tell htmx:
26
27> "When a user clicks on this button, issue an AJAX request to /example, and replace the entire button with the response"
28
29htmx is based on [intercooler.js](http://intercoolerjs.org) and is the successor to that project.
30
31## Website & Docs
32
33[https://htmx.org](https://htmx.org)
34
35[https://htmx.org/docs](https://htmx.org/docs)