Modern, customizable prize wheel spinner for React
npm install react-spin-prize
# or
yarn add react-spin-prize
# or
pnpm add react-spin-prize
import { SpinnerWheel } from 'react-spin-prize';
const items = [
{ id: 1, label: 'Prize 1', color: '#FF6B6B' },
{ id: 2, label: 'Prize 2', color: '#4ECDC4' },
{ id: 3, label: 'Prize 3', color: '#45B7D1' },
{ id: 4, label: 'Prize 4', color: '#FFA07A' },
];
function App() {
const handleSpinComplete = (item) => {
console.log('Winner:', item);
};
return (
<SpinnerWheel
items={items}
onSpinComplete={handleSpinComplete}
size={500}
duration={5000}
/>
);
}