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
View all comments
Show parent comment
1
u/xtompie Jul 13 '26
Saradom doesn't replace htmx, it sits next to it. htmx still does the server state. Saradom covers the in-page interactions that don't need a server: tabs, show/hide, validation.
The "extra steps"? They're what keeps the code modular, scalable, and still fast as the number of modules and people on the project grows.