@mateuszmigas/react-dropdown
v0.9.3
Published
React dropdown
Downloads
2
Readme
React dropdown
This project does not try to implement the ultimate dropdown that will solve all the problems because it's not possible. It provides a set of utilities for creating such dropdown with examples showing how to do so.
Features
- controlled vs uncontrolled state - useDropdownState hook allows you to decide which part of the state you want to control. Check DropdownSimple vs DropdownControlledState
- redux-like state management - it exposes predefined actions and reducer. Both can be changed/extended
- VirtualizedList - a component that uses react-window with item memoization that will render only what's needed and reuse already rendered items
- VirtualizedLazyLoadingList - covers all the functionality of VirtualizedList but allows for lazy loading chunks of items. Uses: react-window-infinite-loader
- Customizable:
- keyboard navigation
- mouse navigation
- focus management
Installation
npm i @mateuszmigas/react-dropdown
or
yarn add @mateuszmigas/react-dropdown
Check examples for the usage
Development
dropdown / yarn;
dropdown / examples / yarn;
dropdown/yarn run watch
dropdown/examples/yarn start
Work in progress
- Check tree-shaking
- Profile