Cards

Cards are flexible user interface elements, which help organize content into meaningful sections and make it easier to display on different screen sizes. Cards contain various smaller components, such as images, text, links and buttons and may act as an entry to more detailed information, helping users scan the page quickly and find the most relevant content.

Default card

Use the .card and .card-body classes to create a card and use it as the basis for a more advanced card design. A card is a perfect way to organize content and make it look neat and tidy.

Card padding

You can change the padding of a newly created card. To do it, use the .card-sm, .card-md or .card-lg classes.

Cards with the .card-sm class are well suited for small items such as widgets, etc., while the .card-lg class can be used for large blocks of text. Padding will be automatically reduced on small devices, to fit the screen size.

<div class="card card-sm">...</div>
<div class="card">...</div>
<div class="card card-md">...</div>
<div class="card card-lg">...</div>

Card with title

Add a title to your card by including the .card-title class within .card-body. You can also place the title inside the .card-header element to separate the title from the content with a horizontal line.

Card with title and image

To create a more visually appealing card, add a title and an image. Thanks to that, the card will go well with your interface design and draw users’ attention.

Blog post card

Add an image to your blog post card to make it eye-catching. You can do it by adding the image in the .card-img-top class. Thanks to the .d-flex and .flex-column classes within .card-body, the author details will be displayed at the bottom of the card.

Row deck

Add the .row-deck class to .row, if you want to display several cards next to one another. Thanks to that, they will all have the same height.

Post card with aside image

You can also add an image on the left side of the card. To do it, add the .card-aside class to the element with the .card class. Then add the image in the .card-aside-column element and it will be automatically centered and scaled to the right size.

Color variations

Add a status color to your card, either at the top or on the side of the card, to customise it and make it more eye-catching.

<div class="card">
  <div class="card-status-top bg-danger"></div>
  <div class="card-body">
    <h3 class="card-title">Card with top status</h3>
    <p class="text-secondary">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aperiam deleniti fugit incidunt, iste, itaque minima
      neque pariatur perferendis sed suscipit velit vitae voluptatem.</p>
  </div>
</div>
<div class="card">
  <div class="card-status-start bg-green"></div>
  <div class="card-body">
    <h3 class="card-title">Card with side status</h3>
    <p class="text-secondary">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aperiam deleniti fugit incidunt, iste, itaque minima
      neque pariatur perferendis sed suscipit velit vitae voluptatem.</p>
  </div>
</div>

Stacked card

Use the card-stacked class to stack up multiple cards, if you want to save screen space or create a visually appealing effect.

Tabbed card

Organize multiple cards into tabs to be able to display more content in a well-organized way and allow users to alternate between them easily.

<!-- Cards with tabs component -->
<div class="card-tabs">
  <!-- Cards navigation -->
  <ul class="nav nav-tabs">
    <li class="nav-item">
      <a href="#tab-top-1" class="nav-link active" data-bs-toggle="tab">Tab 1</a>
    </li>
    <li class="nav-item">
      <a href="#tab-top-2" class="nav-link" data-bs-toggle="tab">Tab 2</a>
    </li>
    <li class="nav-item">
      <a href="#tab-top-3" class="nav-link" data-bs-toggle="tab">Tab 3</a>
    </li>
    <li class="nav-item">
      <a href="#tab-top-4" class="nav-link" data-bs-toggle="tab">Tab 4</a>
    </li>
  </ul>
  <div class="tab-content">
    <!-- Content of card #1 -->
    <div id="tab-top-1" class="card tab-pane active show">
      <div class="card-body">
        <div class="card-title">Content of tab #1</div>
        <p class="text-secondary">
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Adipisci, alias aliquid distinctio dolorem expedita, fugiat hic magni molestiae molestias odit.
        </p>
      </div>
    </div>
    <!-- Content of card #2 -->
    <div id="tab-top-2" class="card tab-pane">
      <div class="card-body">
        <div class="card-title">Content of tab #2</div>
        <p class="text-secondary">
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Adipisci, alias aliquid distinctio dolorem expedita, fugiat hic magni molestiae molestias odit.
        </p>
      </div>
    </div>
    <!-- Content of card #3 -->
    <div id="tab-top-3" class="card tab-pane">
      <div class="card-body">
        <div class="card-title">Content of tab #3</div>
        <p class="text-secondary">
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Adipisci, alias aliquid distinctio dolorem expedita, fugiat hic magni molestiae molestias odit.
        </p>
      </div>
    </div>
    <!-- Content of card #4 -->
    <div id="tab-top-4" class="card tab-pane">
      <div class="card-body">
        <div class="card-title">Content of tab #4</div>
        <p class="text-secondary">
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Adipisci, alias aliquid distinctio dolorem expedita, fugiat hic magni molestiae molestias odit.
        </p>
      </div>
    </div>
  </div>
</div>
Do you have a question? ask the community
Do you see a bug? open an issue on GitHub
Do you like Tabler? tweet about it!
Support Tabler's development: Github Sponsors
illustrations banner imageillustrations banner image dark
65 sleek illustrations for your startup's visual identity.