pacocoursey / cmdk

Fast, unstyled command menu React component.
https://cmdk.paco.me
MIT License
9.42k stars 266 forks source link

How do I force dark mode? #94

Closed talksik closed 1 year ago

talksik commented 1 year ago

My app doesn't support light mode. How can I prevent the styles being dynamic?

I was thinking there would be some prop for theme override.

pacocoursey commented 1 year ago

Hi, cmdk is unstyled by default, so it doesn't come with light or dark mode styles. Can you clarify what you mean, or where your styles are coming from?

talksik commented 1 year ago

If I use some of the given stylesheets, won't it be styled?

https://github.com/pacocoursey/cmdk/tree/main/website/styles/cmdk

pacocoursey commented 1 year ago

Ah yes, it will. You should just remove the light-mode specific CSS from the stylesheet you're copying in, or wrap your container with .dark so that dark mode styles are always applied.

talksik commented 1 year ago

Awesome thank you for that! Appreciate it!