2.0.6 • Published 8 months ago

react-spin-to-wheel v2.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

React Wheel of Fortune

Creating a spinning wheel in React can be a fun project. You can use HTML, CSS, and JavaScript (or JSX in React) to build a simple spinning wheel

Installation

Install react-spin-to-wheel with npm

  npm install react-spin-to-wheel

Usage/Examples

import React  from 'react'
import SpiWheel from 'react-spin-to-wheel/index'

const App = () => {
    const segments = [
        {
            color: '#db7093',
            value: 'Decoration'
        },
        {
            color: '#20b2aa',
            value: 'Recharge'
        },
        {
            color: '#d63e92',
            value: 'Movie Ticket'
        },
        {
            color: '#daa520',
            value: 'Refrigrator'
        },
        {
            color: '#ff340f',
            value: 'Air Conditionar'
        },
        {
            color: '#ff7f50',
            value: 'Ring'
        },
        {
            color: '#3cb371',
            value: 'Watch'
        },
        {
            color: '#4169e1',
            value: 'Laptop'
        }

    ];

    const spinOutput = result => {
        alert(result)
    }
    return (
        <SpiWheel segments={segments} spinOutput={spinOutput} />
    )
}

export default App

Documentation

Documentation

Tech Stack

Client: React Js

Support

For support, email playerofcode@gmail.com or join our Player Of Code channel.

Logo

🚀 About Me

I'm a full stack developer with 4+ years of Experience

🔗 Links

portfolio linkedin

2.0.6

8 months ago

2.0.5

8 months ago

2.0.4

8 months ago

2.0.3

8 months ago

2.0.2

8 months ago

2.0.1

8 months ago

1.0.1

8 months ago