themesberg / flowbite

Open-source UI component library and front-end development framework based on Tailwind CSS
https://flowbite.com
MIT License
7.35k stars 711 forks source link

Users can scroll background when modal is open #741

Closed vascocarreira closed 6 months ago

vascocarreira commented 7 months ago

Hi,

When using Flowbite's modals, users can scroll the background. Does Flowbite provide a flag/directive to prevent this?

Regards

zoltanszogyenyi commented 6 months ago

Hey @vascocarreira,

You can apply the overflow-y-none utility class from Tailwind CSS to the body of the modal to prevent the scroll.

Cheers, Zoltan