Material-ui: Card vs Paper

Created on 11 Dec 2018  路  3Comments  路  Source: mui-org/material-ui

I read through the docs and looked at the code a bit. But I'm still not seeing a major difference between Card and Paper. From the doc examples, they both seem to look the same. Card seems to have specific inner children components, like CardActions, but couldn't that be used under Paper?

What's the difference between Card and Paper? When do you use one vs the other?

Card discussion

Most helpful comment

To expand on that - Card is a very thin wrapper around Paper - it adds one prop that adds a specific elevation, and a style that sets overflow to hidden. (In progamma veritas)

So yes, you could use Paper as a substitute for Card to use with the Card child components, but it would be confusing if we didn't supply a suitable parent component.

All 3 comments

The Card extends the Paper component. The Paper is often used in a context where it contains a list while the Card contains an item.

To expand on that - Card is a very thin wrapper around Paper - it adds one prop that adds a specific elevation, and a style that sets overflow to hidden. (In progamma veritas)

So yes, you could use Paper as a substitute for Card to use with the Card child components, but it would be confusing if we didn't supply a suitable parent component.

Okay. Thank you for your quick and helpful response

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pola88 picture pola88  路  3Comments

anthony-dandrea picture anthony-dandrea  路  3Comments

sys13 picture sys13  路  3Comments

finaiized picture finaiized  路  3Comments

chris-hinds picture chris-hinds  路  3Comments