Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/netbeast/react-native-color-wheel

:rainbow: A react native reusable and color picker wheel
https://github.com/netbeast/react-native-color-wheel

art color-palette color-picker colorsys javascript npm-module react react-native

Last synced: 21 days ago
JSON representation

:rainbow: A react native reusable and color picker wheel

Awesome Lists containing this project

README

        

# react-native-color-wheel
![npm version](https://badge.fury.io/js/react-native-color-wheel.svg)

:art: A react native reusable and color picker wheel

## Usage

```javascript
import React, { Component } from 'react';
import { Dimensions, StyleSheet, View } from 'react-native';
import { ColorWheel } from 'react-native-color-wheel';

const Example = ({onChange}) => (

console.log({color})}
onColorChangeComplete={color => onChange(color)}
style={{width: Dimensions.get('window').width}}
thumbStyle={{ height: 30, width: 30, borderRadius: 30}}
/>


);
```

## Props

| Name | Description | Type |
|-------------------------|------------------------------------------------|--------|
| `initialColor` | Initial value in hex format | String |
| `onColorChange` | Callback when the value is changed or moved | func |
| `onColorChangeComplete` | Callback on mouseup or drag event has finished | func |
| `thumbSize` | Width of draggable thumb | Number |
| `thumbStyle` | CSS for the draggable thumb | Object |

demo screenshot

PRs and issues are more than welcome.


works with yeti

> This package powers [Yeti Smart Home](https://getyeti.co) and is used in production.
Follow us in Github or https://twitter.com/netbeast_co.