react-native-wheel-spinner
TypeScript icon, indicating that this package has built-in type declarations

1.1.7 • Public • Published

react-native-wheel-spinner

Wheel Spinner Component for React Native

Installation

Use the package manager npm and yarn to install react-native-wheel-spinner.

yarn add react-native-wheel-spinner
# or using npm
npm i react-native-wheel-spinner --save

Dependencies

This component is dependent on react-native-svg and D3-shape plugins.

Import

import Spinner from "react-native-wheel-spinner";

Usage

import React from 'react';
import { View } from 'react-native';
import Spinner from 'react-native-wheel-spinner';

const segments = [
{color:'blue',value:'Ram'},
{color:'red',value:'Shyam'},
{color:'orange',value:'Harish'},
{color:'olive',value:'Lucky'},
{color:'pink',value:'Kajal'},
];
const data =  [
{name:'Ram',age:20},
{name:'Shyam',age:29},
{name:'Harish',age:24},
{name:'Lucky',age:25},
{name:'Kajal',age:30}
]
const App = ()=>{
  return(
    <View>
      <Spinner 
        data={data}
        segments={segments} 
        getWinner={(winner)=>{
          console.log(winner)
        }} 
      />
    </View>
  )
}

Readme

Keywords

none

Package Sidebar

Install

npm i react-native-wheel-spinner

Weekly Downloads

2

Version

1.1.7

License

ISC

Unpacked Size

38.8 kB

Total Files

6

Last publish

Collaborators

  • lucky_babu