react-dropdown-material

Made with create-react-library

Usage no npm install needed!

<script type="module">
  import reactDropdownMaterial from 'https://cdn.skypack.dev/react-dropdown-material';
</script>

README

react-dropdown-material

NPM JavaScript Style Guide react-dropdown-material Banner demo

Install

npm i react-dropdown-material

or

yarn add react-dropdown-material

Usage

JS:

import React from 'react';

import { DropDown } from 'react-dropdown-material';
import 'react-dropdown-material/dist/index.css';

const App = () => {
  return (
    <DropDown
      className='DropDown'
      placeholder='Select OS'
      title='OS List'
      items={['Windows', 'Mac OS', 'Linux']}
      onItemSelect={(index, item) => console.log(`"${item}" selected`)}
      selectFirstItem={false}
      darkMode={false}
    />
  )
}

export default App

CSS:

.DropDown {
  button {
    //DropDown button
  }

  ul li {
    //DropDown items
  }
}

License

MIT © boof-tech