I want to add linear-gradient below color to Material-UI Chip as a background color. Is it possible?
linear-gradient(to right bottom, #430089, #82ffa1)
I am using Material-UI v0.18.7.
<Chip backgroundColor={indigo400} style={{width: 120}}>
<Avatar size={32} color={white} backgroundColor={indigo900}>A</Avatar>
This is a Chip
</Chip>
You can override any component in material-ui using classes. Instead of backgroundColor try this code.
Just set the
background
to the desired gradient in your styles:Note that
linear-gradient
is a CSS function that returns an image, not a color. So, you have to set thebackground
property (which takes an image) rather than thebackgroundColor
property (which takes just a color). Here's a quote from the Mozilla docs explaining this more thoroughly: