react-prize-wheel
Version:
A simple, performant React prize wheel component
30 lines • 1.12 kB
TypeScript
import type { SpinWheelProps } from '../types';
/**
* SpinWheel - A customizable prize wheel component
*
* @description Creates an interactive spinning wheel with segments that can be customized
* with different colors, weights, and text. Supports animation configuration, themes,
* and various pointer styles. Uses HTML5 Canvas for optimal performance.
*
* @since 2025-07-25
* @version 1.0.0
*
* @example
* ```tsx
* const segments = [
* { id: '1', text: 'Prize 1', color: '#ff6b6b' },
* { id: '2', text: 'Prize 2', color: '#4ecdc4' },
* ];
*
* <SpinWheel
* segments={segments}
* size={400}
* onSpinComplete={(result) => console.log('Winner:', result.segment.text)}
* />
* ```
*
* @param props - Configuration props for the spin wheel
* @returns JSX element rendering the interactive spin wheel
*/
export declare function SpinWheel({ segments, size, onSpinComplete, onSpinStart, theme, animation, pointer, disabled, className, style, showSpinButton, spinButtonText, predefinedResult, }: SpinWheelProps): import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=SpinWheel.d.ts.map