Components (3): Cards
Some quick example text to build on the card title and make up the bulk of the card's content.
Go somewherediv.card Attribute
style="width: 18rem;"img.card-img-top Attributes
src="..."alt="..."div.card-body
h5.card-title
Card titlep.card-text
Some quick example text ...a.btn.btn-(primary|secondary|...) Attribute
href="..."Go somewhereContent classes for building cards (also can be used for other purposes).
Use div.card-body
div.card
div.card-body
This is some text within a card body.Some quick example text to build on the card title and make up the bulk of the card's content.
Card linkAnother link(h1|h2|h3...).card-title (used h5.card-title above)(h1|h2|h3...).card-subtitle (used h6.card-subtitle above)(a).card-link(p).card-textUse img.card-img-top to set an image on the top.
Some quick example text to build on the card title and make up the bulk of the card's content.
div.card
img.card-img-topdiv.card-bodyNote: It is set as a first child of a card (not within a card body). See Using images for detail.
ul.list-group.list-group-flush
li.list-group-itemdiv.card
div.card-header (sticks to the next flush list)Some quick example text to build on the card title and make up the bulk of the card's content.
div.card
img.card-img-topdiv.card-body (stacks inner subcomponents)
h5.card-titlep.card-textul.list-group.list-group-flusha.card-link (×2, arranged inline) Attribute
href="..."Card linkHeader example (Featured)
With supporting text below as a natural lead-in to additional content.
Go somewhereEmphasizing the header text with h5.card-header
With supporting text below as a natural lead-in to additional content.
Go somewhereUsing a blockquote in a card body (see Typography - Blockquotes )
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
Setting both header+footer, also center-aligned with .text-center
With supporting text below as a natural lead-in to additional content.
Go somewherediv.card sets the width to 100% within the parent as default. There are various ways to specify widths you need.
Responsive example: switchs layouts on md breakpoint (768px)
With supporting text below as a natural lead-in to additional content.
Go somewhereWith supporting text below as a natural lead-in to additional content.
Go somewherediv.row
div.col-md-6
div.card
div.col-md-6
div.card
Use .w-(25|50|75|100) (see Sizing utilities ).
div.card.w-75
div.card.w-50
Use style="width: ...;"
div.card + style="width: 16rem;"
div.card + style="width: 24rem;"
Use .text-(left|center|right) (see Text - alignment ).
div.card.text-left (default)
With supporting text below as a natural lead-in to additional content.
Go somewherediv.card.text-center
With supporting text below as a natural lead-in to additional content.
Go somewherediv.card.text-right
With supporting text below as a natural lead-in to additional content.
Go somewhereBelow are the examples using Nav components.
ul.nav.nav-tabs.card-header-tabs
Some quick example text to build on the card title and make up the bulk of the card's content.
Go somewhereul.nav.nav-pills.card-header-tabs
Some quick example text to build on the card title and make up the bulk of the card's content.
Go somewhereUse img.card-img-(top|bottom) to set image(s) as a header and/or a footer.
img.card-img-bottom
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
Last updated 3 mins ago
img.card-img-bottom
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
Last updated 3 mins ago
Use div.card-img-overlay to overlay text within an image.
Examples using Colors utilities classes
div.card.text-white.bg-primary
Some quick example text to build on the card title and make up the bulk of the card's content.
div.card.text-white.bg-secondary
Some quick example text to build on the card title and make up the bulk of the card's content.
div.card.text-white.bg-success
Some quick example text to build on the card title and make up the bulk of the card's content.
div.card.text-white.bg-danger
Some quick example text to build on the card title and make up the bulk of the card's content.
div.card.text-white.bg-warning
Some quick example text to build on the card title and make up the bulk of the card's content.
div.card.text-white.bg-info
Some quick example text to build on the card title and make up the bulk of the card's content.
div.card.bg-light
Some quick example text to build on the card title and make up the bulk of the card's content.
div.card.text-white.bg-dark
Some quick example text to build on the card title and make up the bulk of the card's content.
Examples using Borders utilities (see Border color )
div.card.border-primary
Some quick example text to build on the card title and make up the bulk of the card's content.
div.card.border-secondary
Some quick example text to build on the card title and make up the bulk of the card's content.
div.card.border-success
Some quick example text to build on the card title and make up the bulk of the card's content.
div.card.border-danger
Some quick example text to build on the card title and make up the bulk of the card's content.
div.card.border-warning
Some quick example text to build on the card title and make up the bulk of the card's content.
div.card.border-info
Some quick example text to build on the card title and make up the bulk of the card's content.
div.card.border-light
Some quick example text to build on the card title and make up the bulk of the card's content.
div.card.border-dark
Some quick example text to build on the card title and make up the bulk of the card's content.
You can set different colors to each subcomponents as header, footer, etc. Furthermore, using .bg-transparent removes default background color. Bellow are variations to set header/footer background colors.
div.card.border-success
div.card-header with background variations (default, all contexts, and transparent)p.card-body.text-successdiv.card-footer with background variations (default, all contexts, and transparent)(Default background)
Some quick example text to build on the card title and make up the bulk of the card's content.
.bg-primary
Some quick example text to build on the card title and make up the bulk of the card's content.
.bg-secondary
Some quick example text to build on the card title and make up the bulk of the card's content.
.bg-success
Some quick example text to build on the card title and make up the bulk of the card's content.
.bg-danger
Some quick example text to build on the card title and make up the bulk of the card's content.
.bg-warning
Some quick example text to build on the card title and make up the bulk of the card's content.
.bg-info
Some quick example text to build on the card title and make up the bulk of the card's content.
.bg-light
Some quick example text to build on the card title and make up the bulk of the card's content.
.bg-dark
Some quick example text to build on the card title and make up the bulk of the card's content.
.bg-transparent
Some quick example text to build on the card title and make up the bulk of the card's content.
Use div.card-(group|deck|columns) to layout multiple cards.
div.card-(group|deck|columns)
div.carddiv.card-group
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
This card has supporting text below as a natural lead-in to additional content.
This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.
div.card-deck
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
This card has supporting text below as a natural lead-in to additional content.
This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.
div.card-columns (advanced) Masonry-like columns layout
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
(2) Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
This card has supporting text below as a natural lead-in to additional content.
Last updated 3 mins ago
(4) Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
This card has supporting text below as a natural lead-in to additional content.
Last updated 3 mins ago
(6) Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.
Last updated 3 mins ago