Skip to content

react select input component (dark grey theme) based on "react-slct 🐘"

License

Notifications You must be signed in to change notification settings

ahmadaidil/reax-select

Repository files navigation

Reax Select ✨

Select input for react component

➡️ How to install and basic usage of 'reax-select'

  • install via npm
$ npm i reax-select
  • install via yarn
$ yarn add reax-select
  • basic usage example
import React from 'react'
import Select from 'reax-select'

const options = [
  { label: 'Volvo', value: 'volvo' },
  { label: 'Saab', value: 'saab' },
  { label: 'Mercedes', value: 'mercedes' },
  { label: 'Audi', value: 'audi' }
]

export default function App() {
  const [singleValue, setSingleValue] = React.useState('')
  const [multiValue, setMultiValue] = React.useState([])

  return (
    <>
      <Select
        isSearchable
        value={singleValue}
        options={options}
        onChange={val => setSingleValue(val)}
        placeholder="select your favorite brand car..."
      />
      <br />
      <Select
        isMulti
        keepSearchOnBlur
        isSearchable
        value={multiValue}
        options={options}
        onChange={val => setMultiValue(val)}
        placeholder="select your favorites brand car..."
      />
    </>
  )
}

Credits:


Contributor:


© 2019 Ahmad Aidil

About

react select input component (dark grey theme) based on "react-slct 🐘"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published