Skip to content

DomVinyard/react-power-select

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-power-select

A highly composable & reusable select components

npm version

Installation

npm i react-power-select --save

Import the CSS in your bundle

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

Usage

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 architecture

About

A highly composable & reusable select components

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 88.7%
  • CSS 11.3%