<b-card> add class only for header or footer
See original GitHub issueI have add class bg-info
only for header or footer.
I need create this block
<div class="card">
<div class="card-header bg-info text-white">text</div>
hello world
</div>
I tired
<b-card show-header>
<div class="bg-info" slot="header" variant="info">test</div>
hello world
</b-card>
But this code transform in
<div class="card">
<div class="card-header">
<div class="bg-info text-white">text</div>
</div>
hello world
</div>
How to do it?
Issue Analytics
- State:
- Created 6 years ago
- Comments:17 (12 by maintainers)
Top Results From Across the Web
Cards - Bootstrap
A card is a flexible and extensible content container. It includes options for headers and footers, a wide variety of content, contextual background...
Read more >Vertically centered card between header and footer [closed]
3 Answers 3 ; To fix that error just add the styling z-index: 1 to the nav and z-index: -1 to the card...
Read more >Card | Components - BootstrapVue
A card is a flexible and extensible content container. It includes options for headers and footers, a wide variety of content, contextual background...
Read more >card-footer - Bootstrap CSS class
Bootstrap CSS class card-footer with source code and live preview. You can copy our examples and paste them into your project!
Read more >Bootstrap 4 card with outline headers and footers - johna's blog
If you use Bootstrap 4 cards and apply one of the outline classes to add some colour you will find the header and...
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 FreeTop 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
Top GitHub Comments
@losblancos113, I think you might want to consider making the
headerClass
prop accept a string or an array. Then you won’t need to set every object value to true or deal with any value sanitation (the regex replace and trim shouldn’t be necessary).Also, I think we should extend this to the footer. Maybe you can even leave the
class="card-header"
, but just add the plain:class="headerClass"
since Vue can handle interpolating all the string, object, or array values to classes.This features should be available in the next release.