How to have custom button styling? #4877
Unanswered
maybebansky
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Hi @maybebansky! You can definitely change the styles outside of the ones that are provided by default. Currently, you can utilize the <Button
variant="primary"
sx={{
'&:hover:not([disabled])': {
backgroundColor: specified_color_here, // Replace "specified_color_here" with the color you'd want
},
backgroundColor: 'accent.emphasis',
}}
>
Primary
</Button> This should then apply the background color to both the button in its default state, as well as when it is being hovered over. Let me know if you have any other questions! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I need to change the styling of a button outside of the variants that come with the design system. Is this supported?
I can style a box with this:
However the bg prop isn't valid on a Button:
Ive tired using a CSS-in-JS library:
The background color is applied, however the hover style isn't as the default styles have a greater specificity:
Beta Was this translation helpful? Give feedback.
All reactions