Skip to content
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

Card vs Paper #13876

Closed
merlinstardust opened this issue Dec 11, 2018 · 3 comments
Closed

Card vs Paper #13876

merlinstardust opened this issue Dec 11, 2018 · 3 comments
Labels
component: card This is the name of the generic UI component, not the React module! discussion

Comments

@merlinstardust
Copy link

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?

@oliviertassinari
Copy link
Member

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.

@mbrookes
Copy link
Member

mbrookes commented Dec 11, 2018

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.

@merlinstardust
Copy link
Author

Okay. Thank you for your quick and helpful response

@oliviertassinari oliviertassinari added discussion component: card This is the name of the generic UI component, not the React module! labels Dec 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: card This is the name of the generic UI component, not the React module! discussion
Projects
None yet
Development

No branches or pull requests

3 participants