-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow variant overrides in Card #27267
Comments
Related to #27130 Basically if I understand correctly the issue, is about adding a new variant prop on the component, although it doesn't exist by default. Then this prop could be used for styling the component differently. |
@mnajdova Yes, this sums it well. |
I am also unable to create custom variants for MuiCard. I use php storm and it does recognize my custom variant. However, the variant simply doesn't work. |
I've found the following workaround in order to add variant to Card component:
Something like this:
|
@JerdoAve solution is working. |
Summary 💡
Allow customizing the variants of card, similar to other elements. There is already
CardPropsColorOverrides
, so there should be aCardPropsVariantOverrides
as well.Motivation 🔦
We use the Card Componente for our product teaser and instead of wrapping the component, we would like directly to style the different variants.
The text was updated successfully, but these errors were encountered: