Component Library

A reusable React component library.

Component Library

Shared React UI, published once, reused everywhere.

Source · npm package

Every side project I build ends up needing the same handful of UI pieces — a theme toggle, a calendar, a markdown renderer. I got tired of rebuilding them from scratch each time, so I pulled them out into a standalone package I publish and maintain myself. Now a design change lands once and propagates across every app that depends on it.

ThemeSwitch component

What’s in it

  • ThemeSwitch — an animated light/dark toggle with sun/moon, clouds and stars, in three sizes

  • MonthlyCalendar — a zero-dependency calendar grid with per-day annotations and built-in light/dark themes

    MonthlyCalendar component

  • MarkdownRender — GitHub-flavoured markdown rendering with custom component overrides and rehype plugin support

How it’s built

React 18/19 + TypeScript, bundled with Vite in library mode to both ESM and CommonJS, with strict type-checking throughout.

  • Subpath exports & tree-shaking — each component ships its own entry point (/theme-switch, /monthly-calendar, /markdown-render), so consumers pull in only what they use and only the peer dependencies that component actually needs.
  • CI verification gate — every PR runs a full check in GitHub Actions: dependency audit, lint, type-check, and build, before anything can merge.
  • Automated deps + release — Dependabot keeps dependencies current, and a custom release script publishes new versions to both npm and GitHub Packages.

Install it with pnpm add @macolmenerori/component-library, or grab just the piece you need — see the npm page for the full API.