Skip to content

feat: add right-click context menu with light, dark, and system options - #2

Open
fatihyldz1 wants to merge 1 commit into
gozenc:masterfrom
fatihyldz1:feat/context-menu-theme-options
Open

feat: add right-click context menu with light, dark, and system options#2
fatihyldz1 wants to merge 1 commit into
gozenc:masterfrom
fatihyldz1:feat/context-menu-theme-options

Conversation

@fatihyldz1

Copy link
Copy Markdown

Description

This PR adds an inline context menu to <DarkModeToggle /> allowing users to explicitly select between Light, Dark, and System themes:

  • Right-Click / Mac Gestures: Right-click, Control + Left Click, two-finger tap on Mac trackpad, and long-press (450ms) open the theme context menu.
  • Continuous System Sync: When set to system, the component's internal state reacts continuously to OS prefers-color-scheme changes so the icon animates and theme classes switch seamlessly forever.
  • Zero-Dependency Styling: Fully self-contained styles with light/dark theme support, popup animations, and ARIA accessibility roles (role="menu", role="menuitemradio").
  • Left-Click Unchanged: Normal left-clicking continues to toggle between Light and Dark mode.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant