react-customizable-select
v1.0.3
Published
A Simple Customizable React Select Component
Downloads
4
Maintainers
Readme
react-customizable-select
A Simple Customizable React Select Component
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