# react-native-country-code-picker

> A react-native country-code-picker plugin

Latest version **1.3.5** (published 2018-01-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-country-code-picker
pnpm add react-native-country-code-picker
yarn add react-native-country-code-picker
bun add react-native-country-code-picker
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.5 |
| Published | 2018-01-31 |
| First published | 2018-01-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | StephenKe |
| Maintainers | stephenke |
| Keywords | react-native |

## Links

- npm: https://www.npmjs.com/package/react-native-country-code-picker
- Repository: https://github.com/StephenKe/react-native-country-code-picker
- Homepage: https://github.com/StephenKe/react-native-country-code-picker#readme
- Issues: https://github.com/StephenKe/react-native-country-code-picker/issues
- npm.io page: https://npm.io/package/react-native-country-code-picker

## Recent versions

- 1.3.5 (latest) — 2018-01-31
- 1.3.1 — 2018-01-31
- 1.2.4 — 2018-01-30
- 1.2.2 — 2018-01-30
- 1.1.3 — 2018-01-30
- 1.0.0 — 2018-01-30

## README

# react-native-country-code-picker

A react native country-code-picker plugin without any ios&android configuration

### Installation

`npm install react-native-country-code-picker --save` or
`yarn add react-native-country-code-picker --save`

### Example

![image](https://github.com/StephenKe/react-native-country-code-picker/blob/master/image/rnccpDemo.gif)

```javascript
import React, { Component } from 'react';
import CountryCodePicker from 'react-native-country-code-picker';

export default class Example extends Component {
  render() {
    return (
      <CountryCodePicker isShow={true} onPick={(res) => { setTimeout(() => { alert(res.phoneCode) }, 1000) }} />
    );
  }
}
```

### API

| Property | Type | Default | Description |
|-------------|----------|--------------|----------------------------------------------------------------|
| isShow | `Boolean` | `false` | Whether show or not |
| onPick   | `Function` |  | callback function after picked |
| animationType | `String` | `slide` | animation('slide', 'fade', 'none') when show and hide |

#### onPick response Object

| Property | Type | Description |
|-------------|----------|----------------------------------------------------------------|
| countryName | `String` | country name |
| countryPinyin   | `String` | country name spell in Chinese PinYin |
| phoneCode | `String` | area code |
| countryCode | `String` | country code |

### License

[MIT](LICENSE)

---
_Source: https://npm.io/package/react-native-country-code-picker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
