react-cool-portal
React hook for Portals, which renders modals, dropdowns, tooltips etc. to <body>
or else.
This is a React hook for Portals. It helps you render an element outside of its component hierarchy. From now on you will never need to struggle with modals, dropdowns, tooltips etc. Hope you guys it.
Milestone
- [x] Auto creating/removing the container of the portal
- [x] Renders element to the portal container
- [x] Show/hide/toggle the portal
- [x] onShow/onHide event callbacks
- [x] Support clickOutsideToHide and escToHide interactions
- [ ] Delay hide portal for animation (maybe...)
- [ ] Server-side rendering compatibility
- [ ] Unit testing
- [x] Demo app
- [ ] Demo code
- [x] Typescript type definition
- [x] CI/CD
- [ ] Documentation
? My Idea
The following example shows you how to create your own modal component by react-cool-portal
.