HTMX · _hyperscript
A small inbox, no JavaScript framework
Folders, search, and compose talk to the server with HTMX. Keys and the compose drawer are _hyperscript on this page. The mailbox is a cookie, so the toy runs with the Fly machines stopped and without Postgres.
Choose a note, or press j.
What this page uses
hx-get,hx-target,hx-swap— open a note and refresh the listhx-triggerwithkeyup changed delay:200ms— searchhx-indicator— “Updating…” while the list refresheshx-swap-oob— unread count, and the list when the reading pane is the main targethx-confirmandhx-delete— archive- Form post with a 422 markup response — compose validation
HX-Push-UrlandHX-Trigger— address bar, and thecloseComposeevent_attribute —j/k/x/cfrom the windowhtmx:afterSwap— put.is-selectedback on the open row after the list is replaced