Card header improvements
See original GitHub issueThe following design needs are popping up for the Card
component:
- multiple headers in a single card acting as full-width separators.
- condensed mode.
![screen shot 2018-08-14 at 11 34 17 am](https://user-images.githubusercontent.com/6738398/44084063-0768d908-9fb6-11e8-9652-1666a50f8d73.png)
Currently, the following <Card><CardHeader/><SomethingElse/><CardHeader/></Card>
markup turns out something like this:
![screen shot 2018-08-14 at 11 33 53 am](https://user-images.githubusercontent.com/6738398/44084068-0a379b74-9fb6-11e8-943f-0494176e4816.png)
API/implementation ideas
The condensed mode can simply mimic the Button
api:
<Card condensed />
For intermediate CardHeader
elements, it is safe to apply top margins differently when the &:first-child
selector matches as opposed to when it doesn’t. In the former case, negative margin should be applied to counter the padding (as it is implemented currently), and in the latter case, positive margin should apply to add some space between the sections that the intermediate headers delienate.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
how to design card header dynamically to the width of card a
Hi,I was developing a login component with card component. I have reduced the width of my card component. But I can not make...
Read more >Measure metric card title improvements (May 13, 2019)
Highlights Based on customer feedback, the Measure metric card title is now bold. Coming Soon! Expected release – 2 weeks Users will...
Read more >.card-primary, .card-header, and .card-inverse don't work well ...
The docs say: Background variants Cards include their own variant classes for quickly changing the background-color and border-color of a ...
Read more >Extended Bootstrap Cards by Keenthemes
Flush Borders. Use .card-flush class to remove a card header and footer borders: ... Add .card-px-0 to reset a card header, body and...
Read more >Playing with Cards in Bootstrap 4 - Simple Talk
Once again, Dino Esposito explains a Bootstrap 4 enhancement. This time, he explains how the card component replaces the well and panel ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@micha-f yes, that’s what the
stackHorizontal
prop on the card is supposed to accomplish.I would use this as a starting point: