i7a-themes
npm package for managing themes in React, with light, dark, and custom modes. Detects system preference and saves settings. Compatible with TypeScript, Next.js, Vite, and Tailwind CSS.
Technologies and libraries used in i7a-themes:
- React (
react,react-dom) – for theme components and hooks. - TypeScript – the entire codebase is fully typed.
- Tsup – for compiling and bundling the package in CommonJS and ESM formats.
- ESLint (
eslint,@eslint/js,eslint-plugin-react,@typescript-eslint/eslint-plugin) – for code linting. - TypeScript ESLint (
@typescript-eslint/parser) – integrates ESLint with TypeScript. - @types/react and @types/react-dom – TypeScript type definitions for React.
- localStorage – native browser API for persisting theme selection.
- CSS Variables / Custom Properties – for dynamic color and style management.
Optional: works seamlessly with Tailwind CSS by mapping CSS variables to Tailwind classes, but Tailwind is not strictly part of the package.