question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I would like to start a discussion on some features and proposals for the next major version of React Color. Here is what I have been thinking:

~React Native Support~

This would require a rewrite of all of the components to use react-primitives. Everything has already been written with inline styles so this will make our job much easier. Along with support for RN, I think we should introduce a few new color pickers that are prevalent in native (Snapchat, Facebook, etc…)

Base Draggable Component

I propose a base component that handles the dragging and calculating of pixel values and position and leaves the translation of color spaces to the components that use it. Right now each component does a bunch of math on their own to figure this out. There have been a couple of requests (#395, #313) to create more sliders or gradient components. This would make them easier to add as well as a great common component for people to use to make their own.

Using Children For Swatches

The API footprint has grown quite a bit to allow for extended functionality of the swatches (#305). I propose we instead move everything over into a new Palette component like the one that @SpencerDawson has been working on and allow people to change the swatches by passing them down as children:

<SketchPicker>
  <MyCustomPalette />
  // or
  { colors.map((color) => (
    <div style={{ background: color }} />
  )) }
</SketchPicker>

Support AMD, UMD & CDN’s

I also propose that the NPM package have a dist folder with both a bundled and a minified version of react-color for use as drop in JS files. This has been requested in #310 and #364.

Type Definition Files

There is a ts definition file in definitely typed, but it is always out of date. I think we should provide both TS and Flow definition files alongside the library for people using typed environments.

New Documentation Backing

Right now the documentation site uses a very janky setup that I created a long time ago. I think we should probably move it over to something that has better community support such as Gatsby. I am open to suggestions here.

Smaller Things

  • Investigate if there is a better, smaller library than tinycolor2 for our color conversions. #184
  • Look into adding more accessibility support. #359
  • Collaborate to create a vision doc that explains where the project is going.
  • Make all components that take user input uncontrolled when focused #404, #216, #371
  • Extend color spectrums that pickers return on change #66, #215

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:11
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
fanatic75commented, Mar 15, 2019

Does this work in react native?

4reactions
LightningXCEcommented, Mar 12, 2019

Hello!

Great work with these, they’re super slick!

I was just curious if there had been an update as well to the 3.0 release, as I am hoping to use this within a react-native application. Is the 3.0 branch currently compatible?

Thanks again!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Proposals for 3.0.0 · Issue #36 · alewin/useWorker - GitHub
I think keeping it as a "reactive" status makes more sense, users might want to do something (update ui) when worker status changes?...
Read more >
proposal - npm
Takes a node-style callbacking function and converts it into a Promise automagically. Latest version: 3.0.0, last published: 7 years ago.
Read more >
Re: 3.0.0-rc2 proposal - The Mail Archive
Re: 3.0.0-rc2 proposal · Justin Mason 27 Aug 2004 21:58:17 -0000. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Michael Parker writes: > All tests...
Read more >
Agency Proposal 3.0, Graphic Templates - Envato Elements
Description ### BigBrand Proposal: Win the job with this beautiful premium 24 page template. It contains Quote Signoff / Timeline / Budget /...
Read more >
Completed: Proposal Unitary Project - Audacity Wiki
This proposal page is about managing Audacity Projects. Proposal pages are used on an ... This is now ongoing development for Audacity 3.0.0...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found