Giter VIP home page Giter VIP logo

react-native-color-picker-ios's Introduction

react-native-color-picker-ios

BuildStatus Version MIT License

iOS14 Color Picker Module for React Native

Grid Spectrum Sliders

Installation

  • using npm:
npm install react-native-color-picker-ios
  • using yarn:
yarn add react-native-color-picker-ios

Usage

import * as React from 'react';
import { View, Text, TouchableOpacity } from 'react-native';
import ColorPicker from 'react-native-color-picker-ios';

const ColorSelectComponent = () => {
  const handlePress = () => {
    ColorPicker.showColorPicker(
      { supportsAlpha: true, initialColor: 'cyan' },
      (color) => {
        console.log(color);
      }
    );
  };

  return (
    <TouchableOpacity onPress={handlePress}>
      <Text>Click to Select Color</Text>
    </TouchableOpacity>
  );
};

Reference

Methods

showColorPicker()

ColorPicker.showColorPicker(options, callback);

Displays the color picker modal, and runs callback function with selected color.

Options

Name Type Required default Description
supportsAlpha boolean NO false if true, user are allowed to chose opacity of the color.
initialColor string NO #000 sets initialColor selected by the picker

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

react-native-color-picker-ios's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar naturalclar avatar raphaelrk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

react-native-color-picker-ios's Issues

Expo support

I am attempting to use this library on an Expo project (running on IOS), but I am running into the following error:
TypeError: null is not an object (evaluating 'RNCColorPicker.showColorPicker')

I have recreated the problem on an Expo snack. Is there any way this library could work on Expo? It looks really good so far.

Module RNCColorPicker requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`.

Hello, I am getting the above error while using the module. How should I resolve this warning?

Environment

react-native info

System:
    OS: macOS 12.2.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 173.48 MB / 32.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 18.7.0 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.15.0 - /opt/homebrew/bin/npm
    Watchman: 2022.07.04.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
    Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2
    react-native: 0.68.0 => 0.68.0
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.