react-customizable-select

1.0.3 • Public • Published

react-customizable-select

A Simple Customizable React Select Component

NPM JavaScript Style Guide

Install

npm install --save react-customizable-select

Necessary Props

options: string[] | object[{abbreviation: string, name: string}]
idName: string
setValue: (val: string) => void

Optionnal Props

customStyle:

const style = {
  fontSize: '24px',
  width: '200px',
  minWidth: '300px',
  color: '#000',
  menuMaxHeight: '250px',
  scrollBehavior: 'smooth',
  labelMargin: '1rem 0 10px 0',
  generalPadding: '8px 16px',
  buttonBorder: '1px solid grey',
  buttonBackground: '#ededed',
  optionsBorder: '1px solid grey',
  optionsBackground: '#fff',
  optionsItemHoverBgColor: 'blue',
  optionsItemColor: 'black',
  optionsItemHoverTxtColor: 'white',
  arrowColor: 'black',
  arrowSize: 10
}

icon:

  <i></i>
  or
  <img></img>
  or
  <svg></svg>

label: string
scrollable: boolean
searchTimer: number in ms
isReset: boolean (used to reset component to initial state)
baseOption: string (used to define the default appearing option)

License

MIT © Dullahan83

Package Sidebar

Install

npm i react-customizable-select

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

79.1 kB

Total Files

7

Last publish

Collaborators

  • dullahan83