
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
react-royale-spinner
Advanced tools
A premium, physics-based spinning wheel component for React applications.
The Ultimate Wheel of Fortune Component for React.
Create engaging, premium-quality "Spin to Win" experiences with modern physics animations, procedural audio, and endless customization.
framer-motion for realistic acceleration, deceleration, and friction.canvas-confetti).npm install react-royale-spinner framer-motion canvas-confetti clsx
# or
yarn add react-royale-spinner framer-motion canvas-confetti clsx
import { SpinWheel, WheelItem } from 'react-royale-spinner';
import 'react-royale-spinner/dist/react-royale-spinner.css';
const items: WheelItem[] = [
{ id: 1, label: 'iPhone 15', color: '#e74c3c', textColor: '#fff' },
{ id: 2, label: '$50 Cash', color: '#f1c40f', textColor: '#000' },
{ id: 3, label: 'Free Spin', color: '#3498db', textColor: '#fff' },
{ id: 4, label: 'Better Luck', color: '#95a5a6', textColor: '#fff' },
];
function App() {
return (
<SpinWheel
items={items}
onSpinFinish={(result) => alert(`You won: ${result.label}`)}
/>
);
}
Create a high-end casino or gaming feel with custom gradients and pointers:
<SpinWheel
items={items}
size={500}
// Gold & dark luxury theme used in casinos
primaryColor="conic-gradient(from 0deg, #f1c40f, #b8860b, #f1c40f, #b8860b)"
secondaryColor="radial-gradient(circle, #f1c40f, #b8860b)"
rimStyle={{
border: '8px solid #4a3b00',
boxShadow: '0 0 30px rgba(241, 196, 15, 0.4)'
}}
pointerProps={{
src: '/path/to/custom-jewel-pointer.png', // Or use style object for CSS shape
style: { width: 60, height: 80, top: -30 }
}}
fontFamily="'Cinzel', serif"
/>
| Prop | Type | Default | Description |
|---|---|---|---|
| Core | |||
items | WheelItem[] | Required | Array of segments (see WheelItem type). |
onSpinFinish | (item) => void | - | Callback fired when the wheel stops. |
size | number | 300 | Diameter of the wheel in pixels. |
spinDuration | number | 4 | Duration of the spin in seconds. |
| Visuals | |||
primaryColor | string | Gold Gradient | Background/rim of the wheel container. can be a gradient string. |
secondaryColor | string | Gold Gradient | Background of the center knob. |
rimStyle | CSSProperties | - | Override style object for the outer rim container. |
pointerProps | object | - | Customize the pointer { src, style, color }. |
| Typography | |||
fontFamily | string | Arial | CSS font-family for segment labels. |
fontSize | number | 14 | Font size (responsive auto-scaling available). |
textColor | string | #fff | Default text color if not specified in WheelItem. |
| Features | |||
disableSound | boolean | false | Turn off procedural sound effects. |
disableConfetti | boolean | false | Turn off the confetti celebration effect. |
| Development | |||
debugResult | number | - | Force a specific segment index (0-based) to win. |
interface WheelItem {
id: string | number;
label: string;
color: string; // Segment background color
textColor?: string; // Optional override for this segment
style?: CSSProperties; // Advanced style overrides
}
Apache 2.0 © [Your Name/Company]
Built with ❤️ for the React Community.
FAQs
A premium, physics-based spinning wheel component for React applications.
We found that react-royale-spinner demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.