|
1 |
| -# react-native-skeleton-loading |
2 |
| -React Native's Skeleton Loading Component |
| 1 | +| | | | | | |
| 2 | +| --------------------------------------- | -------- | ---------- |---------- |---------- | |
| 3 | +| <a href="https://www.npmjs.com/package/react-native-dropdown-country-picker"></a> | <a href="https://www.npmjs.com/package/react-native-dropdown-country-picker"></a> | <a href="https://github.com/mmusaib/react-native-dropdown-country-picker/stargazers"></a> | <a href="https://www.youtube.com/channel/UCSwIR2KBHiqiProH3Me8IZQ"></a> | <a href="https://www.npmjs.com/package/react-native-dropdown-country-picker"></a> |
| 4 | + |
| 5 | +<h1 align="center"> |
| 6 | + 🏳️🌈 React Native Skeleton Loading |
| 7 | +</h1> |
| 8 | + |
| 9 | +<div align="center"> |
| 10 | + |
| 11 | +🟢 React Native Dropdown Country Picker Similar as HTML Select List. It's not a modal. |
| 12 | + |
| 13 | +<a href="https://twitter.com/_mmusaib" target="_blank"></a> |
| 14 | +<img src="https://i.imgur.com/sLjgFRR.gif" width="400" /> |
| 15 | +</div> |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +<h4>Light Weight and <b>Robust</b> Country Picker So Far.</h4> |
| 20 | + |
| 21 | +- Equivalent to React Native Stock Component |
| 22 | +- Use the styles of your choice |
| 23 | +- Search the countries seamlessly |
| 24 | +- Option to add customizable input mobile field next to the Picker |
| 25 | +- Zero dependencies |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | +# Compatibility |
| 30 | + |
| 31 | + |
| 32 | +| iOS | Android | Web | Expo | |
| 33 | +--------|---------|-----|------| |
| 34 | +| ✅ | ✅ | ✅ | ✅ | |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | +# 🔌 Installation |
| 40 | + |
| 41 | +```sh |
| 42 | +$ npm install react-native-dropdown-country-picker |
| 43 | + |
| 44 | +``` |
| 45 | + |
| 46 | +OR |
| 47 | + |
| 48 | +```sh |
| 49 | +$ yarn add react-native-dropdown-country-picker |
| 50 | +``` |
| 51 | + |
| 52 | + |
| 53 | +# 😎 Displaying the country picker |
| 54 | +```jsx |
| 55 | +import CountryCodeDropdownPicker from 'react-native-dropdown-country-picker' |
| 56 | + |
| 57 | +const App = () => { |
| 58 | + const [selected, setSelected] = React.useState('+91'); |
| 59 | + const [country, setCountry] = React.useState(''); |
| 60 | + const [phone, setPhone] = React.useState(''); |
| 61 | + |
| 62 | + return( |
| 63 | + <CountryCodeDropdownPicker |
| 64 | + selected={selected} |
| 65 | + setSelected={setSelected} |
| 66 | + setCountryDetails={setCountry} |
| 67 | + phone={phone} |
| 68 | + setPhone={setPhone} |
| 69 | + countryCodeTextStyles={{fontSize: 13}} |
| 70 | + /> |
| 71 | + ) |
| 72 | + |
| 73 | +}; |
| 74 | +``` |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | +For Live `Demo` [(Expo Snack)](https://snack.expo.dev/@mmusaib/react-native-dropdown-country-picker) |
| 79 | + |
| 80 | +# ⭐ Props for the component |
| 81 | +| Name | Type | Description | Default | |
| 82 | +| ---- | ---- | ----------- | ----------- | |
| 83 | +| selected | state var | The default selected country dial code stored in state variable | N/A |
| 84 | +| setSelected | Function | setState function to set the selected state variable | N/A |
| 85 | +| setCountryDetails | Function | setState function to set additional country details in respective state variable (Optional) | N/A |
| 86 | +| phone | state var | state variable if you want to display phone number field (Optional) | N/A |
| 87 | +| setPhone | Funtion | setState function to set the phone state variable (Optional) | N/A |
| 88 | +| countryCodeContainerStyles | style Object | style object to style the country code container (Optional) | N/A |
| 89 | +| countryCodeTextStyles | style object | style object to style the text inside country code container (Optional) | N/A |
| 90 | +| phoneStyles | style object | style object to style the text input of phone field (Optional) | N/A |
| 91 | +| searchIcon | string | URL of the icon if you want to replace the search icon (Optional) | N/A |
| 92 | +| closeIcon | string | URL of the icon if you want to replace the close icon (Optional) | N/A |
| 93 | +| searchStyles | style object | style object to style the search input field (Optional) | N/A |
| 94 | +| dropdownStyles | style object | style object to style the dropdown container (Optional) | N/A |
| 95 | +| dropdownTextStyles | style object | style object to style the text inside dropdown container (Optional) | N/A |
| 96 | + |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | +# ▶️ Watch Tutorial Video --> |
| 103 | + |
| 104 | + [](https://www.youtube.com/watch?v=ZstelmTWhjw) |
| 105 | + |
| 106 | + |
| 107 | +<!-- For Live `Demo` [(Expo Snack)](https://snack.expo.dev/@mmusaib/react-native-stock-star-rating) |
| 108 | +
|
| 109 | +
|
| 110 | +
|
| 111 | +
|
| 112 | +
|
| 113 | +
|
| 114 | +
|
| 115 | +
|
| 116 | +
|
0 commit comments