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

[bug]: ThemeProvider component does not listen to live color scheme preference changes #4940

Open
2 tasks done
n-d-r-d-g opened this issue Sep 23, 2024 · 1 comment · May be fixed by #4941
Open
2 tasks done

[bug]: ThemeProvider component does not listen to live color scheme preference changes #4940

n-d-r-d-g opened this issue Sep 23, 2024 · 1 comment · May be fixed by #4941
Labels
bug Something isn't working

Comments

@n-d-r-d-g
Copy link

Describe the bug

The ThemeProvider component in the docs does not listen to changes to the user's preference. If the user changes their color scheme preference in their browser/system, they have to refresh the app to get the updated theme.

Affected component/components

Docs/Dark mode/ThemeProvider

How to reproduce

  1. Go to https://ui.shadcn.com/docs/dark-mode/vite.
  2. The code snippet can be found under Dark mode > 1. Create a theme provider.

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

N/A

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues
@n-d-r-d-g n-d-r-d-g added the bug Something isn't working label Sep 23, 2024
@n-d-r-d-g n-d-r-d-g linked a pull request Sep 23, 2024 that will close this issue
@dburles
Copy link

dburles commented Nov 5, 2024

Related: #4094

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants