daisyui / react-daisyui

daisyUI components built with React 🌼
http://react.daisyui.com/
MIT License
950 stars 103 forks source link

Popups should use portals #225

Closed mattiaz9 closed 1 year ago

mattiaz9 commented 1 year ago

Popups such as modals and dropdowns should use portals for the content to avoid problems with overflow: hidden or z-indexes.

benjitrosch commented 1 year ago

Hi @mattiaz9,

Indeed they should, however the portal implementation should be left up to users. While React/CRA could just use ReactDOM.createPortal(), Next.js might render server side where the document and window object do not exist and would require a typeof window !== 'undefined' check.