Ability to set default colorscheme for all components
See original GitHub issue🚀 Feature request
Please describe your request in one or two sentences.
I would find it very convenient if it would be possible to set the default colorscheme for all components at once.
🧱 Problem Statement / Justification
Please provide valid reason(s) why this should added to Chakra UI.
If this feaure is related to a problem you’ve noticed. Mention it as well
Currently, if you want to change the default colorscheme from blue to red, for example, you have to do it for all of the existing components individually:
const theme = extendTheme({
components: {
Button: {
defaultProps: {
colorScheme: "red",
},
},
Tabs: {
defaultProps: {
colorScheme: "red",
},
},
// ... etc
},
});
✅ Proposed solution or API
Please provide code snippets, gists, or links to the ideal design or API
It would be more convenient if we could do something like this:
const theme = extendTheme({
config: {
initialColorMode: "dark",
initialColorScheme: "red",
},
});
↩️ Alternatives
What alternative solutions have you considered before making this request?
As already mentioned, alternative is to set the default colorscheme for every existing component separately. It is not the end of the world to do it individually for all components, but implementing this feature request would be a great quality of life improvement.
📝 Additional Information
What resources (links, screenshots, etc.) do you have to assist this effort?
N/A
Thank you for this great library and all the hard work put into it! Cheers!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:26
- Comments:9 (1 by maintainers)
Top GitHub Comments
https://github.com/chakra-ui/chakra-ui/commit/07612ce47a7a35dba56f1a7836ceac622b497dfb @nielsuit227
It’s also in the docs here: https://chakra-ui.com/docs/theming/customize-theme#theme-extension-withdefaultcolorscheme
Thanks for the request! Considering this isn’t a bug, I’ll add this to our project board so you can track the progress.
Check it here: https://github.com/chakra-ui/chakra-ui/projects/6
Cheers.