$ npm install --save react-color-spin-wheel
$ yarn add react-color-spin-wheel
function Wheel() {
const wheelColors = ["MistyRose", "Wheat", "lightblue", "Khaki", "Lavender"];
const [selectedColor, setSelectedColor] = useState("");
return (
<SpinWheel
colors={wheelColors}
lineWeight={4}
onColorSelect={(color) => {
setSelectedColor(color);
}}
initialRotationDegree={0}
extractionDegrees={0}
size={300}
/>
);
}
Check the documentation to get you started!
Licensed under MIT