Cards #6458
Replies: 5 comments 10 replies
-
Users have mentioned they want clickable cards. Cards could be more reusable if they supported different background colors (banners, toast). Cards have no flexibility for inner spacing unless you detach from the system. |
Beta Was this translation helpful? Give feedback.
-
Creating a |
Beta Was this translation helpful? Give feedback.
-
@gil-- mentioned today on twitter that there isn't a way to build the "stats bar" pattern with our card today. |
Beta Was this translation helpful? Give feedback.
-
We have started working on a new more composable Card component so I wanted to pick up this discussion again. My initial thought after building a basic card with our prototype I do think
What are the design opinions or sensible defaults that should be included with Our existing Card component is pretty opinionated with regards to |
Beta Was this translation helpful? Give feedback.
-
Hey! In the Money team, we have several use cases of "editable area in the card" (more details in the thread). How would you advise to approach this use case? Would it be better to have it as a part of |
Beta Was this translation helpful? Give feedback.
-
Card is the second most used component in the admin, but it’s also the one with the most overrides.
This is a problem because these overrides naturally contribute to less coverage, but they also underline two big issues with the card component, it being too complex and too opinionated.
Why?
Visually, a card is just a container of content with a predefined color, corner radius and shadow. In theory, it should be simple, but in practice we have 3 components that are cards (Card, MediaCard and CalloutCard).
Not to speak of other card-like components that could benefit from sharing simple foundations with the card (Banner, Modal, Popover, and more).
Even if we just isolate the Card component, we end up with 14 props that feel like an overengineered attempt to give a limited level of composability.
I believe we need to:
Build a simple card foundation based on a Box component.
Make card layouts more composable and reduce the amount of props, by building Card templates on top of the new simpler foundations (Box*+Box style**+Box density***)
We could follow this up by identifying other components that can be rebuilt using Box (Probably start with Banner & Modal, based on usage).
*Box is a foundational component that can be used to draw something as a simple rectangle with rounded corners, or something as complex as a resource list.
**Box style includes a background color, border, rounded corners and shadow.
***Box density refers to the padding
Beta Was this translation helpful? Give feedback.
All reactions