Package Exports
- @uiw/react-color-shade-slider
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@uiw/react-color-shade-slider) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
React Color Shade Slider
Install
npm i @uiw/react-color-shade-slider
Usage
import ShadeSlider from '@uiw/react-color-shade-slider';
function Demo() {
const [hsva, setHsva] = useState({ h: 0, s: 0, v: 68, a: 1 });
return (
<ShadeSlider
hsva={hsva}
onChange={(newShade) => {
setHsva({ ...hsva, ...newShade });
}}
/>
);
}
Props
import { AlphaProps } from '@uiw/react-color-alpha';
interface ShadeSliderProps extends Omit<AlphaProps, 'onChange'> {
onChange?: (newShade: { v: number; s: number }) => void;
}
License
Licensed under the MIT License.