Shards

Documentation

Cards

Last updated: February 7, 2018

Cards work the same as in Bootstrap 4 and support all default components. To create a simple card container at a bare minimum you must use the .card class.

Below is a basic example that also has a .card-body.

This is some text within a card block.
<div class="card">
  <div class="card-body">
    This is some text within a card block.
  </div>
</div>

More interesting results can be achieved using mixed content types like images, setting a title or even using buttons.

Card image cap

Sample Card Title

He seems sinking under the evidence could not only grieve and a visit. The father is to bless and placed in his length hid…

Tell me more →
<div class="card" style="width: 20rem;">
  <img class="card-img-top" src="..." alt="Card image cap">
  <div class="card-body">
    <h4 class="card-title">Sample Card Title</h4>
    <p class="card-text">He seems sinking under the evidence could not only grieve and a visit. The father is to bless and placed in his length hid...</p>
    <a href="#" class="btn btn-primary">Tell me more &rarr;</a>
  </div>
</div>

Sizing Cards

Cards occupy the full-width of the parent element, but you can esily control their sizing by utilizing grid markup.

Card image cap

Sample Card Title

He seems sinking under the evidence could not only grieve and a visit. The father is to bless and placed in his length hid…

Tell me more →
Card image cap

Sample Card Title

He seems sinking under the evidence could not only grieve and a visit. The father is to bless and placed in his length hid…

Tell me more →
<div class="row">
  <div class="col-sm-6">
    <div class="card">
      <img class="card-img-top" src="..." alt="Card image cap">
      <div class="card-body">
        <h4 class="card-title">Sample Card Title</h4>
        <p class="card-text">He seems sinking under the evidence could not only grieve and a visit. The father is to bless and placed in his length hid...</p>
        <a href="#" class="btn btn-primary">Tell me more &rarr;</a>
      </div>
    </div>
  </div>
  <div class="col-sm-6">
    <div class="card">
      <img class="card-img-top" src="..." alt="Card image cap">
      <div class="card-body">
        <h4 class="card-title">Sample Card Title</h4>
        <p class="card-text">He seems sinking under the evidence could not only grieve and a visit. The father is to bless and placed in his length hid...</p>
        <a href="#" class="btn btn-primary">Tell me more &rarr;</a>
      </div>
    </div>
  </div>
</div>

Overlays

You can overlay your content on top of images using the .card-img-overlay class.

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

Card Navigation

You can also create complex card combination using the .card-header and .navs.

My Special Title

Cu nam fuisset nostrum scriptorem, tempor invenire laboramus ex vis.

Take me somewhere →

For more information on all the various types of cards we recommend checking out the official Bootstrap 4 documentation on this topic.