Some prop types of Saturation are not exported
Author: hungdoansyCreated Jul 22, 2021Updated May 21, 2026
I tried to import Saturation in my React-Typescript project and use it like below:
import { Saturation } from 'react-color/lib/components/common';
const Component: React.FC = () => {
return (
<Saturation
onChange={handleChange}
hsl={hsl}
hsv={hsv}
/>
);
};VSCode suggests I missed Color prop and hsl and hsv were not needed. I tried to include Color and remove hsl and hsv. It didn't work. And I know the code above was correct because it worked and I checked source code of Saturation as well.
Source: casesandberg/react-color