1 | [![</> htmx](https://raw.githubusercontent.com/bigskysoftware/htmx/master/www/img/htmx_logo.1.png "high power tools for HTML")](https://htmx.org)
|
2 |
|
3 | *high power tools for HTML*
|
4 |
|
5 | [![Gitter](https://badges.gitter.im/intercooler-js/Lobby.svg)](https://gitter.im/intercooler-js/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
6 | [![Netlify Status](https://api.netlify.com/api/v1/badges/dba3fc85-d9c9-476a-a35a-e52a632cef78/deploy-status)](https://app.netlify.com/sites/htmx/deploys)
|
7 | [![Circle CI](https://circleci.com/gh/bigskysoftware/htmx.svg?style=svg)]()
|
8 |
|
9 | ## introduction
|
10 |
|
11 | htmx is a set of HTML extensions give you to access to [AJAX](https://htmx.org/docs#ajax),
|
12 | [WebSockets](https://htmx.org/docs#websockets) and [Server Sent Events](https://htmx.org/docs#sse)
|
13 | via [attributes](https://htmx.org/reference#attributes), allowing you to build [modern UI](https://htmx.org/examples) with the [simplicity](https://en.wikipedia.org/wiki/HATEOAS) and
|
14 | [power](https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm) of hypertext
|
15 |
|
16 | htmx is small ([~7k min.gz'd](https://unpkg.com/htmx.org/dist/)),
|
17 | [dependency-free](https://github.com/bigskysoftware/htmx/blob/master/package.json),
|
18 | [extendable](https://htmx.org/extensions),
|
19 | IE11 compatible & you can try it out quickly, without a huge rewrite
|
20 |
|
21 | ## quick start
|
22 |
|
23 | ```html
|
24 | <!-- Load from unpkg -->
|
25 | <script src="https://unpkg.com/htmx.org@0.0.4"></script>
|
26 | <!-- have a button POST a click via AJAX -->
|
27 | <button hx-post="/clicked" hx-swap="outerHTML">
|
28 | Click Me
|
29 | </button>
|
30 | ```
|
31 |
|
32 | The [`hx-post`](https://htmx.org/attributes/hx-post) and [`hx-swap`](https://htmx.org/attributes/hx-swap) attributes tell htmx:
|
33 |
|
34 | > "When a user clicks on this button, issue an AJAX request to /clicked, and replace the entire button with the response"
|
35 |
|
36 | htmx is the successor to [intercooler.js](http://intercoolerjs.org)
|
37 |
|
38 | ## website & docs
|
39 |
|
40 | * <https://htmx.org>
|
41 | * <https://htmx.org/docs>
|
42 |
|
43 | ## contributing
|
44 |
|
45 | * please write code, including tests, in ES5 for [IE 11 compatibility](https://stackoverflow.com/questions/39902809/support-for-es6-in-internet-explorer-11)
|
46 | * please include test cases in `/test` and docs in `/www`
|
47 | * if you are adding a feature, consider doing it as an [extension](https://htmx.org/extensions) instead to
|
48 | keep the core htmx code tidy
|
49 | * development pull requests should be against the `dev` branch, docs fixes can be made directly against `master`
|
50 |
|
51 | ## haiku
|
52 |
|
53 | *javascript fatigue:<br/>
|
54 | longing for a hypertext<br/>
|
55 | already in hand* |
\ | No newline at end of file |