Skip to content

[UI Improvement] Move Theme Toggle Outside the Mobile Navigation Menu #486

Closed

Description

@anurag2787

Description

Currently, on mobile, users have to open the hamburger menu to access the theme selector.

We can improve this by placing a theme toggle icon directly in the navbar, next to the search icon, so users can switch between Dark and Light themes without opening the navigation menu.

Expected Behavior

  • Move the theme toggle outside the hamburger menu.
  • Place it next to the search icon.
  • Switch between Dark and Light themes with a single click.

This would make theme switching more accessible and provide a cleaner, more consistent mobile experience.

Earlier (We have to open menu and scroll to the bottom to change theme)

Image

Expected

Image

Activity

  1. anurag2787 commented on Oct 30, 2026

    @anurag2787
    CollaboratorAuthor

    Hi @anurag629 this is small UI improvement i think we can do what do you think about it? if it makes sense can I work on it?

  2. anurag629 commented on Oct 30, 2026

    @anurag629
    Member

    Makes sense on a phone, and it's yours, @anurag2787. Starlight puts the theme control in the header's right group, which it hides below 50rem, so on mobile it's only in the menu footer. Two ways to do it:

    • Override Header the same way feat(website): replace theme dropdown with toggle button #484 overrode ThemeSelect, rendering Starlight's default header and adding your ThemeToggle next to the search button on small screens.
    • Or show only the toggle from the right group on small screens, if Starlight's markup lets you do that with CSS alone.

    Then take it out of MobileMenuFooter (another override), so it isn't in two places. Check that the header doesn't overflow at 320px wide, that the button is at least 44px to tap, and that the desktop layout is unchanged. Add before and after screenshots at phone width to the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

hacktoberfestGood pick for Hacktoberfest contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions