React UI state management,
powered by CSS.
pre-render UI state at build time, update interfaces by flipping data-* attributes.
Familiar state API. Zero React re-renders.
Use useUI() to define visual state, then style it with Tailwind variants like menu-open:translate-x-0. Zero-UI generates the CSS at build time, then updates the UI by flipping a data-* attribute.
const [menu, setMenu] = useState('closed');return ( <aside className={menu === 'open' ? 'translate-x-0' : '-translate-x-full'}> <button onClick={() => setMenu('open');}> Open menu </button> </aside>);const [, setMenu] = useUI('menu', 'closed');return ( // automatically generates tailwind variants <aside className="menu-open:translate-x-0 menu-closed:-translate-x-full"> <button onClick={() => setMenu('open');}> Open menu </button> </aside>);Try it right here.
Same UI, built twice. The Zero-UI tab flips data-* attributes on <body>; the React tab holds the same state in useState. Watch the render counters as you click around.
Zero UI
Reactive state, zero re-renders
Accent
Panel demo
React State Management
Re-renders on every change
Accent
Panel demo
closedWhy it's fast.
Zero re-renders
State changes flip DOM attributes. React stays completely out of the loop - no reconciliation, no render cycles.
~350 bytes
Smaller than a single SVG icon. An order of magnitude leaner than Redux or Zustand for UI state.
Build time "pre-rendering"
Zero-UI generates all possible UI states at build time vs re-rendering them on the fly.