stimulus-dropdown
stimulus-dropdown copied to clipboard
Prevent dropdown menu outside the screen
Prevents the menu from leaving the screen, so that it always remains visible.
This also allows the menu to be used in the navigation bars at the bottom of the screen, with the menu displayed at the top and not off the screen, simplifying responsiveness and preventing unwanted behavior.
Video: Test on preview url: https://share.cleanshot.com/kqJLh2NR
Deploy Preview for stimulus-dropdown ready!
Name | Link |
---|---|
Latest commit | 4116ac64e3d1224c98421a7364318c31d4b143ee |
Latest deploy log | https://app.netlify.com/sites/stimulus-dropdown/deploys/642b47d7ffd6fd000883ba9f |
Deploy Preview | https://deploy-preview-9--stimulus-dropdown.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
This is a good idea! Thanks a lot
But this PR seems to be really tied to Tailwind syntax and not really customizable. I'll do some tests on my side and you can try to update the PR in the meantime 👍
Everything is done on the controller side, you can refer to my last two commit names for more information on the latest updates.
Up
hi, thanks for the PR!
But I don't really like the approach with the style customization. It seems to be too specific and not a generic solution.
In my project, I just changed the CSS of the dropdown so it opens in the other direction and it works well. I'm not sure it worth all this changes to fix the issue though