omgovich / react-colorful

🎨 A tiny (2,8 KB) color picker component for React and Preact apps
https://omgovich.github.io/react-colorful
MIT License
3.19k stars 100 forks source link

Ability for custom shapes picker #183

Closed randyrollog closed 2 years ago

randyrollog commented 2 years ago

Hey!

I'd like to make a circle color picker with react-colorful. When I add the border radius to .react-colorful I get the circle shape, but I'm able to select colors outside of the visible circle.

Let me know if I'm missing something or if I should apply the border radius to anything else.

Thanks!

omgovich commented 2 years ago

Hi @randyrollog! It's possible to change border-radius with CSS to adjust the picker's look to better look inside of your app design, but the interactive areas of the picker are rectangles anyway. Unfortunately, we don't have any plans of supporting custom picker shapes. React-colorful is a micro-library and we aim to fit the most popular scenarios in the smallest bundle size possible.