# react-power-select
A highly composable &amp; reusable select components

[![npm version](https://badge.fury.io/js/react-power-select.svg)](https://www.npmjs.com/package/react-power-select)

### DEMO https://selvagsz.github.io/react-power-select/

# Installation

```bash
npm i react-power-select --save
```

# Usage

```js
import { Component } from 'react'
import { PowerSelect } from 'react-power-select'

export default class Demo extends Component {
  state = {};

  handleChange({ option }) {
    this.setState({
      selectedOption: option
    })
  }

  render() {
    return (
      <PowerSelect
        options={['React', 'Ember', 'Angular', 'Vue', 'Preact', 'Inferno']}
        selected={this.state.selectedOption}
        onChange={this.handleChange}
      />
    )
  }
}
```


## Credits

Hat tip to [ember-power-select's](https://github.com/cibernox/ember-power-select) [architecture](http://www.ember-power-select.com/EPS_disected-48ad0d36e579a5554bff1407b51c554b.png)

# react-power-select
A highly composable &amp; reusable select components

[![npm version](https://badge.fury.io/js/react-power-select.svg)](https://www.npmjs.com/package/react-power-select)

### DEMO https://selvagsz.github.io/react-power-select/

# Installation

```bash
npm i react-power-select --save
```

Import the CSS in your bundle

```js
import 'react-power-select/dist/react-power-select.css'
```

# Usage

```js
import React, { Component } from 'react'
import { PowerSelect } from 'react-power-select'

export default class Demo extends Component {
  state = {};

  handleChange = ({ option }) => {
    this.setState({
      selectedOption: option
    })
  }

  render() {
    return (
      <PowerSelect
        options={['React', 'Ember', 'Angular', 'Vue', 'Preact', 'Inferno']}
        selected={this.state.selectedOption}
        onChange={this.handleChange}
      />
    )
  }
}
```


## Credits

Hat tip to [ember-power-select's](https://github.com/cibernox/ember-power-select) [architecture](http://www.ember-power-select.com/EPS_disected-48ad0d36e579a5554bff1407b51c554b.png)

Update readme with css import step
Update readme with css import step
