DEV Community

Cover image for I got tired of bloated React libraries, so I built two tiny ones
Luis Vargas
Luis Vargas

Posted on

I got tired of bloated React libraries, so I built two tiny ones

I've been building React apps for years, and two things kept frustrating me:

Every animation library I tried was either too heavy, caused unnecessary re-renders, or was painful to sequence. And every date picker pulled in date-fns or moment.js just to format a date.
So I stopped looking and started building. The result is ReactZero โ€” a family of zero-dependency React primitives that are tiny, accessible, and easy to drop in.

Here's what I've shipped so far:

@reactzero/flow โ€” animation orchestration for React

Most animation libraries in React drive animations through state, which means every frame triggers a re-render. @reactzero/flow skips all of that by running animations directly on the browser's compositor thread via the Web Animations API.

The API is built around composable primitives:

import { useSequence, animate } from "@reactzero/flow";

function Card() {
  const box = useRef(null);

  const { play } = useSequence([
    () => animate(box.current, [{ opacity: 0 }, { opacity: 1 }], { duration: 300 }),
    () => animate(box.current, [{ transform: "translateY(8px)" }, { transform: "translateY(0)" }], { duration: 200 }),
  ]);

  return <div ref={box} onClick={play}>Click me</div>;
}
Enter fullscreen mode Exit fullscreen mode

A few things I haven't seen done well elsewhere:

  • Adaptive degradation: automatically slows or skips animations based on device capability and frame rate
  • True cancellation: finished always resolves, never rejects. No try/catch needed
  • Scroll-driven animations: uses native ScrollTimeline when available, with a clean fallback
  • Reduced motion: provider-level policy system (skip, reduce, crossfade, respect)
npm install @reactzero/flow
Enter fullscreen mode Exit fullscreen mode

๐Ÿ”— GitHub ยท Docs

@reactzero/datepicker โ€” accessible date picker, no date library required

12KB gzipped. Zero dependencies. WCAG 2.1 AA.
I tried every popular React date picker and they all shared the same problems: heavy dependencies, hard to customize, and accessibility treated as an afterthought.

@reactzero/datepicker uses only native Intl and Date APIs โ€” no date-fns, no moment, nothing extra.

import { DatePicker } from '@reactzero/datepicker';
import '@reactzero/datepicker/styles';

function App() {
  const [date, setDate] = useState(null);
  return <DatePicker value={date} onChange={setDate} placeholder="Select date..." />;
}
Enter fullscreen mode Exit fullscreen mode

If you want full control over the UI, the headless hooks give you complete ARIA compliance without any of the default styles:

import { useDatePicker } from '@reactzero/datepicker';

function MyDatePicker() {
  const { state, isOpen, getGridProps, getCellProps, getTriggerProps } =
    useDatePicker({ locale: 'en-US' });

  // Build whatever UI you want
}
Enter fullscreen mode Exit fullscreen mode

Ships with 10 built-in themes, 3 density modes, range picker, datetime picker, RTL support, and keyboard navigation out of the box.

npm install @reactzero/datepicker
Enter fullscreen mode Exit fullscreen mode

๐Ÿ”— GitHub ยท Live Demo

The idea behind ReactZero

Both packages share the same philosophy: zero runtime dependencies, small bundle, accessible by default, easy to style.

I'm planning to keep adding primitives to the family under that same promise.

If either of these solves a problem you've had, a โญ on GitHub goes a long way โ€” it helps other developers find them.

And if you run into anything broken, unexpected, or just have feedback โ€” issues and PRs are very welcome. This is early and I genuinely want to know how it holds up in real projects.

Thanks for reading ๐Ÿ™

motiondesignlv (Luis Vargas) ยท GitHub

Sr .Product Designer / Ux Engineer. motiondesignlv has 34 repositories available. Follow their code on GitHub.

favicon github.com

Top comments (0)