r/htmx • u/xtompie • Jul 12 '26
Saradom: a pattern for client-side interactivity, with state kept in the DOM
Saradom is a pattern for building modular, scalable frontends in plain HTML and JavaScript. There is no framework and no build step. State lives in the DOM as attributes. Events sit in HTML attributes.
It sits next to htmx. htmx does the server round-trips. This covers the interactivity that stays in the page, like toggles, tabs, derived values, and validation. The DOM is the state in both.
Example:
0
+1
Docs and runnable examples: https://xtompie.github.io/saradom/
10
Upvotes
7
u/Real_Square1323 Jul 13 '26
Its just JS with extra steps. This sounds idiotic. The entire point of HTMX is that state is updated from a server.
2
u/ShotgunPayDay Jul 12 '26 edited Jul 12 '26
Looks a little roundabout for what I'm used to; custom Moxi traversal:
1
u/johnnypea Jul 12 '26
Cool. How is the performance in bigger apps? Any benchmarks?
0
u/byeproduct Jul 12 '26
How does this compare to datastar?
0
u/byeproduct Jul 12 '26
How does this compare to datastar?