Cards

A flexible and extensible content container with multiple variants and options. Read the Official Bootstrap Documentation for a full list of instructions and other options.


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">
  <img src="..." class="card-img-top" alt="...">
  <div class="card-body">
    <h6 class="card-title">Card title</h6>
    <p class="card-text">Some quick example text...</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.

This is some text within a card body.
<div class="card">
  <div class="card-body">
    This is some text within a card body.
  </div>
</div>
Title, Text and Links

Card titles are used by adding .card-title to a heading tag. In the same way, links are added and placed next to each other by adding .card-link to an anchor tag.

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">
  <div class="card-body">
    <h5 class="card-title">Card title</h5>
    <h6 class="card-subtitle mb-2 text-muted">Card subtitle</h6>
    <p class="card-text">Some quick example text...</p>
    <a href="#" class="card-link">Card link</a>
    <a href="#" class="card-link">Another link</a>
  </div>
</div>
Card Images

Places an image to the top and bottom of the card.

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="card">
  <img src="..." class="card-img-top" alt="">
  <div class="card-body">...</div>
</div>

<div class="card">
  <div class="card-body">...</div>
  <img src="..." class="card-img-bottom" alt="">
</div>

Header & Footer

Add an optional header and/or footer within a card.

Featured

With supporting text below as a natural lead-in to additional content.

With supporting text below as a natural lead-in to additional content.

<div class="card">
  <div class="card-header">Featured</div>
  <div class="card-body">...</div>
</div>

<div class="card">
  <div class="card-body">...</div>
  <div class="card-footer">...</div>
</div>

Card Navigation

Add some navigation to a card’s header (or block) with Bootstrap’s nav components.

Special title treatment

With supporting text below as a natural lead-in to additional content.

<div class="card">
  <div class="card-header">
    <ul class="nav nav-tabs card-header-tabs">...</ul>
  </div>
  <div class="card-body">...</div>
</div>

Image Overlay

Turn an image into a card background and overlay your card’s text.

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 bg-dark text-white">
  <img src="..." class="card-img" alt="">
  <div class="card-img-overlay">
    <h5 class="card-title">Card title</h5>
    ...
  </div>
</div>

Background Color

Use text and background utilities to change the appearance of a card.

Header

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

Header

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

Header

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

Header

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

Header

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

Header

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

<div class="card tx-white bg-primary">...</div>
<div class="card tx-white bg-secondary">...</div>
<div class="card tx-white bg-success">...</div>
<div class="card tx-white bg-warning">...</div>
<div class="card tx-white bg-danger">...</div>
<div class="card tx-white bg-info">...</div>

Card Groups

Use card groups to render cards as a single, attached element with equal width and height columns. Card groups use flex display to achieve their uniform sizing.

...
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

...
Card Title

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

Last updated 3 mins ago

...
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.

Last updated 3 mins ago

<div class="card-group">
  <div class="card">...</div>
  <div class="card">...</div>
  <div class="card">...</div>
</div>

Card Decks

Need a set of equal width and height cards that aren’t attached to one another? Use card decks.

...
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

...
Card Title

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

Last updated 3 mins ago

...
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.

Last updated 3 mins ago

<div class="card-deck">
  <div class="card">...</div>
  <div class="card">...</div>
  <div class="card">...</div>
</div>

Card Columns

Cards can be organized into Masonry-like columns with just CSS by wrapping them in .card-columns.

...
Card title that wraps to a new line

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

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

Someone famous in Source Title
...
Card title

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

Last updated 3 mins ago

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat.

Someone famous in Source Title
Card title

This card has a regular title and short paragraphy of text below it.

Last updated 3 mins ago

...

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

Someone famous in Source Title
Card title

This is another card with title and supporting text below. This card has some additional content to make it slightly taller overall.

Last updated 3 mins ago

<div class="card-columns">
  <div class="card">...</div>
  <div class="card">...</div>
  <div class="card">...</div>
</div>