Cards

Bootstrap's cards provide a flexible and extensible content container with multiple variants and options.

About

A card is a flexible and extensible content container. It includes options for headers and footers, a wide variety of content, contextual background colors, and powerful display options. If you’re familiar with Bootstrap 3, cards replace our old panels, wells, and thumbnails. Similar functionality to those components is available as modifier classes for cards.

Example

Cards are built with as little markup and styles as possible, but still manage to deliver a ton of control and customization. Built with flexbox, they offer easy alignment and mix well with other Bootstrap components. They have no margin by default, so use spacing utilities as needed.

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. This is easily customized with our various sizing options.

Card image cap

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" style="width: 20rem;">
  <img class="card-img-top" src="..." alt="Card image cap">
  <div class="card-body">
    <h4 class="card-title">Card title</h4>
    <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="javascript:;" 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>

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" style="width: 20rem;">
  <div class="card-body">
    <h4 class="card-title">Card title</h4>
    <h6 class="card-subtitle mb-2 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="javascript:;" class="card-link">Card link</a>
    <a href="javascript:;" class="card-link">Another link</a>
  </div>
</div>

Images

.card-img-top places an image to the top of the card. With .card-text, text can be added to the card. Text within .card-text can also be styled with the standard HTML tags.

Card image cap

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

<div class="card" style="width: 20rem;">
  <img class="card-img-top" src="..." alt="Card image cap">
  <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>

List groups

Create lists of content in a card with a flush list group.

  • Cras justo odio
  • Dapibus ac facilisis in
  • Vestibulum at eros
<div class="card" style="width: 20rem;">
  <ul class="list-group list-group-flush">
    <li class="list-group-item">Cras justo odio</li>
    <li class="list-group-item">Dapibus ac facilisis in</li>
    <li class="list-group-item">Vestibulum at eros</li>
  </ul>
</div>
Featured
  • Cras justo odio
  • Dapibus ac facilisis in
  • Vestibulum at eros
<div class="card" style="width: 20rem;">
  <div class="card-body">
    Featured  
  </div>
  <ul class="list-group list-group-flush">
    <li class="list-group-item">Cras justo odio</li>
    <li class="list-group-item">Dapibus ac facilisis in</li>
    <li class="list-group-item">Vestibulum at eros</li>
  </ul>
</div>

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

Someone famous in Source Title
<div class="card">
  <div class="card-body">
    <blockquote class="blockquote blockquote-primary mb-0">
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
      <footer class="blockquote-footer">Someone famous in <cite title="Source Title">Source Title</cite></footer>
    </blockquote>
  </div>
</div>

Text alignment

You can quickly change the text alignment of any card—in its entirety or specific parts—with our text align classes.

Special title treatment

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

Go somewhere

Special title treatment

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

Go somewhere

Special title treatment

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

Go somewhere
<div class="card" style="width: 20rem;">
  <div class="card-body">
    <h4 class="card-title">Special title treatment</h4>
    <p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
    <a href="javascript:;" class="btn btn-primary">Go somewhere</a>
  </div>
</div>

<div class="card text-center" style="width: 20rem;">
  <div class="card-body">
    <h4 class="card-title">Special title treatment</h4>
    <p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
    <a href="javascript:;" class="btn btn-primary">Go somewhere</a>
  </div>
</div>

<div class="card text-right" style="width: 20rem;">
  <div class="card-body">
    <h4 class="card-title">Special title treatment</h4>
    <p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
    <a href="javascript:;" class="btn btn-primary">Go somewhere</a>
  </div>
</div>

Images

Cards include a few options for working with images. Choose from appending “image caps” at either end of a card, overlaying images with card content, or simply embedding the image in a card.

Image caps

Similar to headers and footers, cards can include top and bottom “image caps”—images at the top or bottom of a card.

Card image cap

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 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 image cap
<div class="card mb-3">
  <img class="card-img-top" src="..." alt="Card image cap">
  <div class="card-body">
    <h4 class="card-title">Card title</h4>
    <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 class="card">
  <div class="card-body">
    <h4 class="card-title">Card title</h4>
    <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>
  <img class="card-img-bottom" src="..." alt="Card image cap">
</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.

Card image

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 class="card-img" src="..." alt="Card image">
  <div class="card-img-overlay">
    <h4 class="card-title">Card title</h4>
    <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>

Examples

Blog cards

We will create a great experience

Cards are an interaction model that are spreading pretty widely, in fact. What all of these have in common is that they're pulling...
<div class="card card-blog">
  <div class="card-image">
    <a href="javascript:;">
      <img class="img" src="../../../assets/img/sections/neill-kumar.jpg">
    </a>
  </div>
  <div class="card-body text-center">
    <h4 class="card-title">
      We will create a great experience
    </h4>
    <div class="card-description">
      Cards are an interaction model that are spreading pretty widely, in fact. What all of these have in common is that they're pulling...
    </div>
    <div class="card-footer">
      <a href="javascript:;" class="btn btn-danger btn-round">View Article</a>
    </div>
  </div>
</div>

"Less, but better – because it concentrates on the essential aspects, and the products are not burdened with non-essentials. Back to purity, back to simplicity. At best, it is self-explanatory."

<div class="card" data-background="color" data-color="orange">
  <div class="card-body">
    <div class="author">
      <a href="javascript:;">
        <img src="../../../assets/img/faces/erik-lucatero-2.jpg" alt="..." class="avatar img-raised">
        <span>Erik Johnson</span>
      </a>
    </div>
    <span class="category-social pull-right">
      <i class="fa fa-quote-right"></i>
    </span>
    <div class="clearfix"></div>
    <p class="card-description">
      "Less, but better – because it concentrates on the essential aspects, and the products are not burdened with non-essentials. Back to purity, back to simplicity. At best, it is self-explanatory."
    </p>
  </div>
</div>

Card profile

Ayo Michael

Designer

Hey there! Welcome to your user card. As you can see, it is already looking great.

<div class="card card-profile">
  <div class="card-cover" style="background-image: url('../../../assets/img/sections/angelo-pantazis.jpg')">
  </div>
  <div class="card-avatar border-white">
    <a href="#avatar">
      <img src="../../../assets/img/faces/ayo-ogunseinde-2.jpg" alt="...">
    </a>
  </div>
  <div class="card-body">
    <h4 class="card-title">Ayo Michael</h4>
    <h6 class="card-category">Designer</h6>
    <p class="card-description">
    Hey there! Welcome to your user card. As you can see, it is already looking great.
    </p>
  </div>
</div>

Full background card

Travel

Unlike fashionable design, it lasts many years – even in today’s throwaway society.

<div class="card" data-background="image" style="background-image: url('../../../assets/img/sections/david-marcu.jpg')">
  <div class="card-body">
    <h6 class="card-category">Travel</h6>
    <div class="card-icon">
      <i class="nc-icon nc-spaceship"></i>
    </div>
    <p class="card-description">Unlike fashionable design, it lasts many years – even in today’s throwaway society.</p>
    <div class="card-footer">
      <a href="javascript:;" class="btn btn-danger btn-round card-link">
        <i class="fa fa-book" aria-hidden="true"></i> Read Article
      </a>
    </div>
  </div>
</div>

Card pricing

Enterprise

$139

  • Sharing Tools
  • Design Tools
  • Private Messages
  • Personal Brand
  • Twitter API
Get Started
<div class="card card-pricing">
  <div class="card-body">
    <h6 class="card-category">Enterprise</h6>
    <h1 class="card-title">$139</h1>
    <ul>
      <li><i class="fa fa-check text-success" aria-hidden="true"></i> Sharing Tools</li>
      <li><i class="fa fa-check text-success" aria-hidden="true"></i> Design Tools</li>
      <li><i class="fa fa-times text-danger" aria-hidden="true"></i> Private Messages</li>
      <li><i class="fa fa-times text-danger" aria-hidden="true"></i> Personal Brand</li>
      <li><i class="fa fa-times text-danger" aria-hidden="true"></i> Twitter API</li>
    </ul>
    <a href="javascript:;" class="btn btn-success btn-round card-link">Get Started</a>
  </div>
</div>

Plain card

Joe Gardner

Artist and Music Composer

Joe Garnder is one of the co-founders and drives the technical strategy of the platform, customer support and brand. Talk with Joe only interesting topics.

<div class="card card-profile card-plain">
  <div class="card-avatar border-white">
    <a href="#avatar">
      <img src="../../../assets/img/faces/joe-gardner-2.jpg" alt="...">
    </a>
  </div>
  <div class="card-body">
    <h4 class="card-title">Joe Gardner</h4>
    <h6 class="card-category">Artist and Music Composer</h6>
    <p class="card-description">
    Joe Garnder is one of the co-founders and drives the technical strategy of the platform, customer support and brand. Talk with Joe only interesting topics.
    </p>
  </div>
  <div class="card-footer text-center">
    <button href="javascript:;" class="btn btn-icon btn-outline-default btn-border btn-round"><i class="fa fa-check"></i> Following</button>
  </div>
</div>

Text coloured card

Best cards

Green Card

What all of these have in common is that they're pulling information out of the app or the service and making it relevant to the moment.

<div class="card-big-shadow">
  <div class="card card-just-text" data-background="color" data-color="green" data-radius="none">
    <div class="card-body">
      <h6 class="card-category">Best cards</h6>
      <h4 class="card-title"><a href="javascript:;">Green Card</a></h4>
      <p class="card-description">What all of these have in common is that they're pulling information out of the app or the service and making it relevant to the moment. </p>
    </div>
  </div> <!-- end card -->
</div>