Cards
Basic Example #
Below is an example of a basic card with mixed content and a fixed width. Cards have no fixed width to start, so they'll naturally fill the full width of its parent element.

Card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Go somewhere<div class="card w-20x">
<img src="" class="card-img-top h-auto" alt="" width="320" height="180" />
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the bulk of the
card's content.
</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
Content Types #
Cards support a wide variety of content, including images, text, list groups, links, and more. Below are examples of what's supported.
Body #
The building block of a card is the
.card-body
. Use it whenever you need a padded section within a card.
<div class="card"><div class="card-body">This is some text within a card body.</div></div>
Titles, Text, And Links #
Card titles are used by adding
.card-title
to a
<h*>
tag. In the same way, links are added and placed next to each other by adding
.card-link
to an
<a>
tag.
Subtitles are used by adding a
.card-subtitle
to a
<h*>
tag. If the
.card-title
and the
.card-subtitle
items are placed in a
.card-body
item, the card title and subtitle are aligned nicely.
Card title
Card subtitle
Some quick example text to build on the card title and make up the bulk of the card's content.
Card link Another link<div class="card w-20x">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<h6 class="card-subtitle mb-4 text-muted">Card subtitle</h6>
<p class="card-text">
Some quick example text to build on the card title and make up the bulk of the
card's content.
</p>
<a href="#" class="card-link">Card link</a>
<a href="#" class="card-link">Another link</a>
</div>
</div>
Images #
Use
.card-img-top
to places an image to the top of the card and
.card-img-bottom
to place it to the bottom.

Some quick example text to build on the card title and make up the bulk of the card's content.
Some quick example text to build on the card title and make up the bulk of the card's content.

<div class="row g-5">
<div class="col-12 col-sm-6">
<div class="card">
<img src="" class="card-img-top h-auto" alt="" width="640" height="360" />
<div class="card-body">
<p class="card-text">
Some quick example text to build on the card title and make up the
bulk of the card's content.
</p>
</div>
</div>
</div>
<div class="col-12 col-sm-6">
<div class="card">
<div class="card-body">
<p class="card-text">
Some quick example text to build on the card title and make up the
bulk of the card's content.
</p>
</div>
<img src="" class="card-img-bottom h-auto" alt="" width="640" height="360" />
</div>
</div>
</div>
List groups #
Create lists of content in a card with a flush list group.
- An item
- A second item
- A third item
<div class="card w-20x">
<ul class="list-group list-group-flush">
<li class="list-group-item">An item</li>
<li class="list-group-item">A second item</li>
<li class="list-group-item">A third item</li>
</ul>
</div>
Header And Footer #
Add an optional header and/or footer within a card.
Featured
Special title treatment
With supporting text below as a natural lead-in to additional content.
Go somewhere<div class="card">
<h5 class="card-header">Featured</h5>
<div class="card-body">
<h6 class="card-title">Special title treatment</h6>
<p class="card-text">
With supporting text below as a natural lead-in to additional content.
</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
<div class="card-footer text-muted"><small>2 days ago</small></div>
</div>
Kitchen Sink #
Mix and match multiple content types to create the card you need, or throw everything in there. Shown below are image styles, blocks, text styles, and a list group — all wrapped in a fixed-width card.

Card title
Some quick example text to build on the card title and make up the bulk of the card's content.
- An item
- A second item
- A third item
<div class="card w-20x">
<img src="" class="card-img-top h-auto" alt="" width="320" height="180" />
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the bulk of the
card's content.
</p>
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">An item</li>
<li class="list-group-item">A second item</li>
<li class="list-group-item">A third item</li>
</ul>
<div class="card-footer">
<a href="#" class="card-link">Card link</a
><a href="#" class="card-link">Another link</a>
</div>
</div>
Navigation #
Add some navigation to a card's header (or block) with Bootstrap's nav component or tabs .
Special title treatment
With supporting text below as a natural lead-in to additional content.
Go somewhere<div class="card text-center">
<div class="card-header">
<ul class="nav nav-tabs card-header-tabs">
<li class="nav-item">
<a class="nav-link active" aria-current="true" href="#"
>Active<span class="nav-link-sa-indicator"></span
></a>
</li>
<li class="nav-item"><a class="nav-link" href="#">Link</a></li>
<li class="nav-item"><a class="nav-link" href="#">Link</a></li>
<li class="nav-item">
<a class="nav-link disabled" tabindex="-1" aria-disabled="true"
>Disabled</a
>
</li>
</ul>
</div>
<div class="card-body">
<h5 class="card-title">Special title treatment</h5>
<p class="card-text">
With supporting text below as a natural lead-in to additional content.
</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
Special title treatment
With supporting text below as a natural lead-in to additional content.
Go somewhere<div class="card text-center">
<div class="card-header">
<ul class="nav nav-pills card-header-pills">
<li class="nav-item"><a class="nav-link active" href="#">Active</a></li>
<li class="nav-item"><a class="nav-link" href="#">Link</a></li>
<li class="nav-item"><a class="nav-link" href="#">Link</a></li>
<li class="nav-item">
<a class="nav-link disabled" tabindex="-1" aria-disabled="true"
>Disabled</a
>
</li>
</ul>
</div>
<div class="card-body">
<h5 class="card-title">Special title treatment</h5>
<p class="card-text">
With supporting text below as a natural lead-in to additional content.
</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
Image Overlays #
Turn an image into a card background and overlay your card's text. Depending on the image, you may or may not need additional styles or utilities.

<div class="card bg-dark text-white shadow-none">
<img src="" class="card-img h-auto" alt="" width="640" height="360" />
<div class="card-img-overlay">
<h5 class="card-title">Card title</h5>
<p class="card-text">
This is a wider card with supporting text below as a natural lead-in to
additional content. This content is a little bit longer.
</p>
<p class="card-text">Last updated 3 mins ago</p>
</div>
</div>
Horizontal #
Using a combination of grid and utility classes, cards can be made horizontal in a mobile-friendly and responsive way. In
the example below, we remove the grid gutters with
.g-0
and use
.col-md-*
classes to make the card horizontal at the
md
breakpoint. Further adjustments may be needed depending on your card content.

Card title
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
<div class="card">
<div class="row g-0">
<div class="col-md-4">
<img
src=""
class="h-100 w-100 object-fit-cover"
alt=""
width="640"
height="360"
/>
</div>
<div class="col-md-8">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">
This is a wider card with supporting text below as a natural lead-in
to additional content. This content is a little bit longer.
</p>
<p class="card-text">
<small class="text-muted">Last updated 3 mins ago</small>
</p>
</div>
</div>
</div>
</div>
Card Styles #
Cards include various options for customizing their backgrounds, borders, and color.
Background And Color #
Use text color and background utilities to change the appearance of a card.
Primary card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Secondary card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Success card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Danger card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Warning card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Info card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Light card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Dark card title
Some quick example text to build on the card title and make up the bulk of the card's content.
<div class="row g-5">
<div class="col-6">
<div class="card text-white bg-primary shadow-none">
<div class="card-header">Header</div>
<div class="card-body text-white">
<h5 class="card-title">Primary card title</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the
bulk of the card's content.
</p>
</div>
</div>
</div>
<div class="col-6">
<div class="card text-dark bg-secondary shadow-none">
<div class="card-header">Header</div>
<div class="card-body text-dark">
<h5 class="card-title">Secondary card title</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the
bulk of the card's content.
</p>
</div>
</div>
</div>
<div class="col-6">
<div class="card text-white bg-success shadow-none">
<div class="card-header">Header</div>
<div class="card-body text-white">
<h5 class="card-title">Success card title</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the
bulk of the card's content.
</p>
</div>
</div>
</div>
<div class="col-6">
<div class="card text-white bg-danger shadow-none">
<div class="card-header">Header</div>
<div class="card-body text-white">
<h5 class="card-title">Danger card title</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the
bulk of the card's content.
</p>
</div>
</div>
</div>
<div class="col-6">
<div class="card text-white bg-warning shadow-none">
<div class="card-header">Header</div>
<div class="card-body text-white">
<h5 class="card-title">Warning card title</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the
bulk of the card's content.
</p>
</div>
</div>
</div>
<div class="col-6">
<div class="card text-white bg-info shadow-none">
<div class="card-header">Header</div>
<div class="card-body text-white">
<h5 class="card-title">Info card title</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the
bulk of the card's content.
</p>
</div>
</div>
</div>
<div class="col-6">
<div class="card text-dark bg-light shadow-none">
<div class="card-header">Header</div>
<div class="card-body text-dark">
<h5 class="card-title">Light card title</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the
bulk of the card's content.
</p>
</div>
</div>
</div>
<div class="col-6">
<div class="card text-white bg-dark shadow-none">
<div class="card-header">Header</div>
<div class="card-body text-white">
<h5 class="card-title">Dark card title</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the
bulk of the card's content.
</p>
</div>
</div>
</div>
</div>
Border #
Use
border utilities
to change just the
border-color
of a card. Note that you can put
.text-{color}
classes on the parent
.card
or a subset of the card's contents as shown below.
Primary card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Secondary card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Success card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Danger card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Warning card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Info card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Light card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Dark card title
Some quick example text to build on the card title and make up the bulk of the card's content.
<div class="row g-5">
<div class="col-6">
<div class="card card-sa-border border-primary">
<div class="card-header border-primary">Header</div>
<div class="card-body text-primary">
<h5 class="card-title">Primary card title</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the
bulk of the card's content.
</p>
</div>
<div class="card-footer border-primary">Footer</div>
</div>
</div>
<div class="col-6">
<div class="card card-sa-border border-secondary">
<div class="card-header border-secondary">Header</div>
<div class="card-body text-dark">
<h5 class="card-title">Secondary card title</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the
bulk of the card's content.
</p>
</div>
<div class="card-footer border-secondary">Footer</div>
</div>
</div>
<div class="col-6">
<div class="card card-sa-border border-success">
<div class="card-header border-success">Header</div>
<div class="card-body text-success">
<h5 class="card-title">Success card title</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the
bulk of the card's content.
</p>
</div>
<div class="card-footer border-success">Footer</div>
</div>
</div>
<div class="col-6">
<div class="card card-sa-border border-danger">
<div class="card-header border-danger">Header</div>
<div class="card-body text-danger">
<h5 class="card-title">Danger card title</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the
bulk of the card's content.
</p>
</div>
<div class="card-footer border-danger">Footer</div>
</div>
</div>
<div class="col-6">
<div class="card card-sa-border border-warning">
<div class="card-header border-warning">Header</div>
<div class="card-body text-warning">
<h5 class="card-title">Warning card title</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the
bulk of the card's content.
</p>
</div>
<div class="card-footer border-warning">Footer</div>
</div>
</div>
<div class="col-6">
<div class="card card-sa-border border-info">
<div class="card-header border-info">Header</div>
<div class="card-body text-info">
<h5 class="card-title">Info card title</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the
bulk of the card's content.
</p>
</div>
<div class="card-footer border-info">Footer</div>
</div>
</div>
<div class="col-6">
<div class="card card-sa-border border-light">
<div class="card-header border-light">Header</div>
<div class="card-body text-dark">
<h5 class="card-title">Light card title</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the
bulk of the card's content.
</p>
</div>
<div class="card-footer border-light">Footer</div>
</div>
</div>
<div class="col-6">
<div class="card card-sa-border border-dark">
<div class="card-header border-dark">Header</div>
<div class="card-body text-dark">
<h5 class="card-title">Dark card title</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the
bulk of the card's content.
</p>
</div>
<div class="card-footer border-dark">Footer</div>
</div>
</div>
</div>
Card Layout #
In addition to styling the content within cards, Bootstrap includes a few options for laying out series of cards. For the time being, these layout options are not yet responsive .
Card Groups #
Use card groups to render cards as a single, attached element with equal width and height columns. Card groups start off
stacked and use
display: flex;
to become attached with uniform dimensions starting at the
sm
breakpoint.

Card title
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

Card title
This card has supporting text below as a natural lead-in to additional content.

Card title
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 class="card-group">
<div class="card">
<img src="" class="card-img-top h-auto" alt="" width="640" height="360" />
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">
This is a wider card with supporting text below as a natural lead-in to
additional content. This content is a little bit longer.
</p>
</div>
<div class="card-footer">
<small class="text-muted">Last updated 3 mins ago</small>
</div>
</div>
<div class="card">
<img src="" class="card-img-top h-auto" alt="" width="640" height="360" />
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">
This card has supporting text below as a natural lead-in to additional
content.
</p>
</div>
<div class="card-footer">
<small class="text-muted">Last updated 3 mins ago</small>
</div>
</div>
<div class="card">
<img src="" class="card-img-top h-auto" alt="" width="640" height="360" />
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">
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.
</p>
</div>
<div class="card-footer">
<small class="text-muted">Last updated 3 mins ago</small>
</div>
</div>
</div>
Grid Cards #
Use the Bootstrap grid system and its
.row-cols
classes
to control how many grid columns (wrapped around your cards) you show per row. For example, here's
.row-cols-1
laying out the cards on one column, and
.row-cols-md-2
splitting four cards to equal width across multiple rows, from the medium breakpoint up.

Card title
This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

Card title
This is a short card.

Card title
This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

Card title
This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
<div class="row row-cols-1 row-cols-md-2 g-5">
<div class="col">
<div class="card h-100">
<img src="" class="card-img-top h-auto" alt="" width="640" height="360" />
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">
This is a longer card with supporting text below as a natural lead-in
to additional content. This content is a little bit longer.
</p>
</div>
<div class="card-footer">
<small class="text-muted">Last updated 3 mins ago</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<img src="" class="card-img-top h-auto" alt="" width="640" height="360" />
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">This is a short card.</p>
</div>
<div class="card-footer">
<small class="text-muted">Last updated 3 mins ago</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<img src="" class="card-img-top h-auto" alt="" width="640" height="360" />
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">
This is a longer card with supporting text below as a natural lead-in
to additional content. This content is a little bit longer.
</p>
</div>
<div class="card-footer">
<small class="text-muted">Last updated 3 mins ago</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<img src="" class="card-img-top h-auto" alt="" width="640" height="360" />
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">
This is a longer card with supporting text below as a natural lead-in
to additional content. This content is a little bit longer.
</p>
</div>
<div class="card-footer">
<small class="text-muted">Last updated 3 mins ago</small>
</div>
</div>
</div>
</div>