lorenzolewis / starlight-utils

🧰 Utilities to use with your 🌟 Starlight site.
https://starlight-utils.pages.dev
MIT License
39 stars 6 forks source link

NavLinks are not mobile friendly #72

Open andrii-bodnar opened 3 months ago

andrii-bodnar commented 3 months ago

It becomes impossible to use nav links on mobile screens, especially if the labels are long or there are multiple links in the menu.

Add a short video:

https://github.com/user-attachments/assets/88242c75-ae63-47dc-a4e4-136e8bc5df37

It would be great to convert these links to select or at least make their container scrollable.

lorenzolewis commented 3 months ago

I 100% agree with this and haven't personally been happy with my implementation of this yet. I think my ideal state for this would be to push those items down into the mobile drop down on the smaller viewports rather than having side-scrolling. But to do that I think there's a few changes that I would need upstream in Starlight that I wrote up here: https://github.com/withastro/starlight/discussions/2162

Tl;dr that mobile menu button isn't rendered on every page by default so users wouldn't even be able to see the menu to begin with.