npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@react-zero-ui/core

v0.3.4

Published

Ultra-fast React UI state library with zero runtime, zero re-renders, Tailwind variant support, and automatic data-attribute/css-vars based styling. Replace context, prop drilling, and global stores with build-time magic.

Readme

@react-zero-ui/core

Tagline Zero UI logo

The fastest possible UI updates in React. Period.
Zero runtime, zero React re-renders, and the simplest developer experience ever.
Say goodbye to context and prop-drilling.

Bundle size npm version License: MIT CI

📖 See the proof🚀 Quick Start📚 API Reference🤝 Contributing


🔥 Core Concept: "Pre-Rendering"

Why re-render UI if all states are known at build time?
React Zero-UI pre-renders UI states once - at no runtime cost - and flips data-* attributes to update. That's it.

const [, setTheme] = useUI('theme', 'dark');

// Flip theme to "light"
setTheme('light'); // data-theme="light" on body

Tailwind usage:

<div class="theme-dark:bg-black theme-light:bg-white">Fast & Reactive</div>

🚀 How it Works (Build-Time Magic)

React Zero-UI uses a hyper-optimized AST resolver in development that scans your codebase for:

  • useUI and useScopedUI hook usage
  • Any variables resolving to strings (e.g., 'theme', 'modal-open')
  • Tailwind variant classes (e.g., theme-dark:bg-black)

This generates:

  • Optimal CSS with global or scoped variant selectors
  • Initial data-* attributes injected onto <body> (zero FOUC)
  • UI state with ease, no prop-drilling
  • Zero runtime overhead in production

🚀 Quick Start

Requires: Vite or Next.js (App Router)

npx create-zero-ui

Manual config:


📚 API Reference

Basic Hook Signature

const [staleValue, setValue] = useUI('key', 'value');
  • key ➡️ becomes data-key on <body>
  • value ➡️ default SSR value
  • staleValue ➡️ SSR fallback (doesn't update after mount)

🔨 useUI – Global UI State

import { useUI } from '@react-zero-ui/core';

const [theme, setTheme] = useUI('theme', 'dark');
  • Updates data-theme on <body>
  • No React re-renders
  • Globally accessible with Tailwind

🎯 useScopedUI – Scoped UI State

import { useScopedUI } from '@react-zero-ui/core';

const [theme, setTheme] = useScopedUI('theme', 'dark');

<div
	ref={setTheme.ref}
	data-theme={theme}>
	Scoped UI Here
</div>;
  • Sets data-* on a specific DOM node
  • Scoped Tailwind variants only apply inside that element
  • Prevents FOUC, no re-renders

🌈 CSS Variable Support

Pass the CssVar flag for variable-based state:

import { CssVar } from '@react-zero-ui/core';

const [blur, setBlur] = useUI('blur', '0px', CssVar);
setBlur('5px'); // body { --blur: 5px }

Scoped example:

const [blur, setBlur] = useScopedUI('blur', '0px', CssVar);

<div
	ref={setBlur.ref}
	style={{ '--blur': blur }}>
	Scoped blur effect
</div>;

🧪 Experimental Feature: zeroOnClick

Enables interactivity inside Server Components without useEffect.
Only ~300 bytes of runtime.

Read more: experimental.md


📦 Summary of Benefits

  • 🚀 Zero React re-renders
  • ⚡️ Pre-rendered UI: state embedded at build time
  • 📦 <350B runtime footprint
  • 💫 Simple DX: hooks + Tailwind variants
  • ⚙️ AST-powered: cached fast builds

Zero re-renders. Zero runtime. Infinite scalability.


🤝 Contributing

We welcome all contributions!


Made with ❤️ for the React community by @austin1serb