Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@flockcover/react-native-chooser

Package Overview
Dependencies
Maintainers
6
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flockcover/react-native-chooser

Simple Cross platform SELECT tag for React-Native

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
6
Created
Source

Reason for fork:

The original of this package was here: https://github.com/gs-akhan/react-native-chooser However, it was no longer maintained, and we needed this bug: https://github.com/gs-akhan/react-native-chooser/issues/43 fixed for react native 0.57.1 support

React Native Chooser

Simple DropDown menu for React Native App! Your Select Tag for React Native. Fully Customizable too.

Introduction

React Native Chooser is simple, customizable and easy to use dropdown in React Native. It has been tested on both Android and IOS and works like a charm.

Installation

npm i react-native-chooser --save

Usage

import React, { Component } from 'react';
import {Select, Option} from "react-native-chooser";

import {
  AppRegistry,
  StyleSheet,
  Text,
  View
} from 'react-native';

export default class AwesomeProject extends Component {

  constructor(props) {
    super(props);
    this.state = {value : "Select Me Please"}
  }
  onSelect(value, label) {
    this.setState({value : value});
  }

  render() {
    return (
      <View style={styles.container}>
        <Select
            onSelect = {this.onSelect.bind(this)}
            defaultText  = {this.state.value}
            style = {{borderWidth : 1, borderColor : "green"}}
            textStyle = {{}}
            backdropStyle  = {{backgroundColor : "#d3d5d6"}}
            optionListStyle = {{backgroundColor : "#F5FCFF"}}
          >
          <Option value = {{name : "azhar"}}>Azhar</Option>
          <Option value = "johnceena">Johnceena</Option>
          <Option value = "undertaker">Undertaker</Option>
          <Option value = "Daniel">Daniel</Option>
          <Option value = "Roman">Roman</Option>
          <Option value = "Stonecold">Stonecold</Option>
          <Option value = "Rock">Rock</Option>
          <Option value = "Sheild">Sheild</Option>
          <Option value = "Orton">Orton</Option>

        </Select>
      </View>
    );
  }
}

Props

Props for Select
Prop NameData TypeDefault ValuesDescription
onSelectfunctionnullfunction that executes on selection of an option
defaultTextstringClick To SelectText to show as default text
styleobjectnullTo style the select box.
backdropStyleobjectnullTo style the overlay
textStyleobjectnullTo style the text shown in the box
optionListStyleobjectnullTo style the selection box
transparentbooleanfalseTo set the transparent prop on Modal
animationTypestring"none"To set the animationType prop on Modal
indicatorstring"none", "up" or "down""none"
indicatorColorstring"black"The color of the indicator arrow
indicatorSizenumber10The size of the indicator arrow
indicatorStyleobjectnullTo style the indicator arrow
indicatorIconreact elementnullShow the indicator icon
selectedstringnullGive it same value as you give to Option
selectedStyleobjectnullApply styles to the selected Option
Functions for Select
Function NameDescription
setSelectedText(text)Set default text in the select option, often used to reset text.
Props for Option
Prop NameData TypeDefault ValuesDescription
styleobjectnullTo style each option
styleTextobjectnullTo style the text shown in the option

Demo

IOS and Android:

Contributions

Your contributions and suggestions are heartily♡ welcome. (✿◠‿◠)

Keywords

FAQs

Package last updated on 23 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc