casesandberg / casesandberg/react-color

Maintained modernization fork: @antonlimar/react-color

Open
#962 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.3k
Forks
920
PR merge metrics
No merged PRs in 30d

Description

Hi everyone,

For anyone still depending on `react-color`: I maintain a modernization fork published as [`@antonlimar/react-color`](https://www.npmjs.com/package/@antonlimar/react-color).

The goal is to keep the familiar `react-color` API and picker set usable in modern React projects, while updating the package internals, build pipeline, documentation, and type support.

## Why this fork exists

The original `react-color` package has been hugely useful for years, but many projects now need a maintained version that works better with current React, ESM-first tooling, TypeScript-aware development, modern test runners, and actively maintained documentation.

`@antonlimar/react-color` is intended as a practical continuation of that work rather than a completely new picker library.

## What is improved

- Maintained fork with current releases.
- TypeScript-compatible source and public typings.
- Modern ESM package output.
- Root named imports for the familiar picker components.
- Preserves the familiar top-level picker names where practical: `AlphaPicker`, `BlockPicker`, `CirclePicker`, `ChromePicker`, `CompactPicker`, `GithubPicker`, `GooglePicker`, `HuePicker`, `MaterialPicker`, `PhotoshopPicker`, `SketchPicker`, `SliderPicker`, `SwatchesPicker`, and `TwitterPicker`.
- Shared building blocks are still available, including `CustomPicker`, `Alpha`, `Hue`, `Saturation`, `EditableInput`, `Checkboard`, `Raised`, and `Swatch`.
- Modern docs site with live examples: https://antonlimar.github.io/react-color/
- Storybook-based component development.
- Vitest + Testing Library test stack.
- Vite-based documentation site.
- Component CSS is shipped with the relevant picker entrypoints.
- Additional styling hooks such as `className`, `classNames`, `theme`, CSS variables, and public `rc-*` class hooks.

## Migration

Install:

```sh
npm install @antonlimar/react-color
```

Then update imports:

```diff
- import { SketchPicker } from 'react-color';
+ import { SketchPicker } from '@antonlimar/react-color';
```

For most picker usage, the component-level API should feel familiar.

## Important differences

This fork modernizes the package contract, so there are a few intentional differences:

- Published package artifacts are ESM-focused.
- CommonJS `require('@antonlimar/react-color')` is not supported.
- Legacy deep imports from `react-color/lib/...` should be replaced with root named imports where possible.
- Runtime `propTypes` are no longer emitted; TypeScript typings and docs are the preferred source of API feedback.

## Links

- Package: https://www.npmjs.com/package/@antonlimar/react-color
- Repository: https://github.com/antonlimar/react-color
- Documentation: https://antonlimar.github.io/react-color/

Thanks to the original `react-color` maintainers and contributors. This fork exists because the original project became a widely adopted and very useful foundation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.