[Button] `variantColor` does not work with `COLOR_NAME.600`
See original GitHub issueI want to set Button’s variantColor
to blue.600
(from the default theme):
<Button m={2} variantColor="blue.600" variant="solid">
LinkedIn
</Button>
Unfortunately, it doesn’t fully render the button (no text, color, shape; only on hover text underline is visible). When I use variantColor="blue"
it works correctly:
It also doesn’t work with other colors, ex. red.300
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Chakra UI colorScheme prop on button - Stack Overflow
The colorScheme just accepts the color name. In your case, it will be colorScheme="brand" . If we inspect the way chakra works to...
Read more >Color Variants | Reference - BootstrapVue
Color variants and CSS class mapping. Below are the variants available when using the default Bootstrap v4 CSS. When using BootstrapVue components, ...
Read more >React Colors with Bootstrap - examples & tutorial
Colors built with Bootstrap 5, React 17 and Material Design 2.0. Enables comprehensive color customization of theme, background, text, links, buttons and ...
Read more >Customize Theme - Chakra UI
You're not limited to the component styles that Chakra provides, you can ... For example, let's override the component styles for Chakra's Button...
Read more >Buttons · Bootstrap v5.2
If you don't want the button text to wrap, you can add the .text-nowrap class to the button. In Sass, you can set...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@xxczaki If you read Segun’s answer, he explains why you can’t pass a plain color, or even theme-config color like
blue.600
to thevariantColor
prop. The button component has behavior that relies on using more than one value from the theme variant color specified source.You can work around this by making your own entry in the theme colors that satisfies all the numbers, or override styles via
_active
,_hover
, etc. props.I thought it would be helpful to share this code sandbox for anyone with the same issue.
Thanks @dodas !!