Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More controls for the theme switcher #4291

Open
garryxiao opened this issue Oct 21, 2024 · 2 comments
Open

More controls for the theme switcher #4291

garryxiao opened this issue Oct 21, 2024 · 2 comments
Assignees
Labels
component: DashboardLayout enhancement This is not a bug, nor a new feature scope: toolpad-core Abbreviated to "core"

Comments

@garryxiao
Copy link

garryxiao commented Oct 21, 2024

Summary

Currently, the only way to hide the switcher I found is to disable the 'light' or 'dark' mode.
const demoTheme = extendTheme({ colorSchemes: { light: true, dark: false }, colorSchemeSelector: "class", breakpoints: { values: { xs: 0, sm: 600, md: 600, lg: 1200, xl: 1536 } } });
More than that, it should support to hide it by a more straightforward way, and also provide the possiblility to create the icon in some other places, not only a static existing icon there.

Examples

No response

Motivation

No response

Search keywords: switcher

@garryxiao garryxiao added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 21, 2024
@bharatkashyap
Copy link
Member

Similar to #4151 - the proposal is to

  1. Showcase the useColorScheme hook in a demo so users know how to build their own theme switcher
  2. Add a slot for the theme switcher in the DashboardLayout so users can hide it

@apedroferreira

@bharatkashyap bharatkashyap added component: DashboardLayout scope: toolpad-core Abbreviated to "core" enhancement This is not a bug, nor a new feature and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 21, 2024
@apedroferreira
Copy link
Member

Yep, a slot that will allow you to hide or override the theme switcher is already in the plans for the next release since #4151

Also will make it clearer that the ThemeSwitcher component can be imported and used, and not mark it as just an internal component anymore.

@apedroferreira apedroferreira self-assigned this Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: DashboardLayout enhancement This is not a bug, nor a new feature scope: toolpad-core Abbreviated to "core"
Projects
Status: Backlog
Development

No branches or pull requests

3 participants