react-distpicker

1.0.2 • Public • Published

react-distpicker

react-distpicker is a Chinese district picker for react, inspiring from Distpicker

Demo

https://aneureka.github.io/react-distpicker/

Getting started

Install

npm install react-distpicker -S

or

yarn add react-distpicker -S

Create component

import DistPicker from 'react-distpicker';
 
const App = () => (
    <DistPicker />
);
 
export default App;

You can have a glance in /examples.

Options

Property Description Type Default value
placeholderProvince placeholder for province selector string —— 省 ——
placeholderCity placeholder for city selector string —— 市 ——
placeholderDistrict placeholder for district selector String —— 区 ——
pickerClass class for the Distpicker, mainly used to change the style String
selectClass class for the select component in DistPicker, mainly used to change the style String
onSelect the callback function while selecting, receiving an object including province, city and district func

Contributor

Aneureka

License

The plugin is open-sourced software licensed under the MIT license.

/react-distpicker/

    Package Sidebar

    Install

    npm i react-distpicker

    Weekly Downloads

    4

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    122 kB

    Total Files

    7

    Last publish

    Collaborators

    • aneureka