2.1.1 • Published 2 years ago

@midly/react-dropdown v2.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

React-dropdown

npm package npm package npm package npm package

React-dropdown is a simplest way to create a dropdown on your ReactJS site.

  • Very small (less than 11Kb)
  • Mobile friendly

Getting Started

Install this package:

npm i @midly/react-dropdown

Import the component, and define the options.

All other attributes are optional.

If a default value is not defined, the first option will be selected.

You can add all <select /> compatible attributes as wanted.

import { Dropdown } from '@midly/react-dropdown';

const options = [
 'Sales',
 'Marketing',
 'Engineering',
 'Human Ressources',
 'Legal'
]

<Dropdown
    label="Department" //optional
    labelclassname="block my-1" //optional
    options={options} //required
    defaultValue={Engineering} //optional
    onChange={onChange} //optional
    onBlur={onBlur} //optional
    className="form-select bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg block w-full p-2.5" //optional
/>
2.1.1

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago