Overview
Anim
Layout
Forms
Components
Accordion
Alerts
Avatar
Badge
Breadcrumb
Buttons
Button group
Close button
Calendar
Card
Caret
Carousel
Classified
Dropdowns
List
Loader
Modal
Navbar
Nav | Pills
Nav | Tabs
Pagination
Placeholders
Progress
Rating
Scrollbar
Sidenav
Spinners
Tables
Timeline
Toasts
Tooltips
TreeView
Utilities

Cards

Card is a responsive content container with an extensible option for headers, footers, images, and a wide variety of content. Many examples and tutorials.

UsageNg Card

Basic examples

Simple

Use the following simple Card component with a title and a description:

Card title

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

      <div class="Card" style="max-width: 20rem;">
        <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>
          <button type="button" class="Btn Btn-primary">Button</button>
        </div>
      </div>
  
Image

Use the following example of a Card element with an image for blog posts, user Cards, and many more:

Random Img
Card title

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

Button
      <div class="Card" style="max-width: 20rem;">
        <img class="Card-img-top" src="https://source.unsplash.com/random/940x400?sig=1" alt="Random Img"/>
        <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">Button</a>
        </div>
      </div>
  
Header and footer

Add optional header and footer sections to the Card.

Featured
Special title treatment

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

Button
      <div class="Card Text-center" style="max-width: 20rem;">
        <div class="Card-header">Featured</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">Button</a>
        </div>
        <div class="Card-footer Fg-muted">2 days ago</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>
  
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 linkAnother link
      <div class="Card" style="width: 20rem;">
        <div class="Card-body">
          <h5 class="Card-title">Card title</h5>
          <h6 class="Card-subtitle MB-2 Fg-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

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

Random Img

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="https://source.unsplash.com/random/940x400?sig=1" alt="Random Img"/>
        <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

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 List-flush">
          <li class="List-item">Cras justo odio</li>
          <li class="List-item">Dapibus ac facilisis in</li>
          <li class="List-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-header">Featured</div>
        <ul class="List List-flush">
          <li class="List-item">Cras justo odio</li>
          <li class="List-item">Dapibus ac facilisis in</li>
          <li class="List-item">Vestibulum at eros</li>
        </ul>
      </div>
  
  • Cras justo odio
  • Dapibus ac facilisis in
  • Vestibulum at eros
      <div class="Card" style="width: 20rem;">
        <ul class="List List-flush">
          <li class="List-item">Cras justo odio</li>
          <li class="List-item">Dapibus ac facilisis in</li>
          <li class="List-item">Vestibulum at eros</li>
        </ul>
        <div class="Card-footer">
          Card footer
        </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.

Random Img
Card title

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

  • Cras justo odio
  • Dapibus ac facilisis in
  • Vestibulum at eros
      <div class="Card" style="width: 20rem;">
        <img class="Card-img-top" src="https://source.unsplash.com/random/940x400?sig=1" alt="Random Img"/>
        <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 List-flush">
          <li class="List-item">Cras justo odio</li>
          <li class="List-item">Dapibus ac facilisis in</li>
          <li class="List-item">Vestibulum at eros</li>
        </ul>
        <div class="Card-body">
          <a href="#" class="Card-link">Card link</a>
          <a href="#" class="Card-link">Another link</a>
        </div>
      </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" style="width: 20rem;">
        <div class="Card-header">Featured</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>
  

Card headers can be styled by adding .Card-header to <h*> elements.

Featured
Special title treatment

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

Go somewhere
      <div class="Card" style="width: 20rem;">
        <h5 class="Card-header">Featured</h5>
        <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>
  
Quote

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

Someone famous in Source Title
      <div class="Card" style="width: 20rem;">
        <h5 class="Card-header">Quote</h5>
        <div class="Card-body">
          <blockquote class="Blockquote 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>
  
Featured
Special title treatment

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

Go somewhere
      <div class="Card Text-center" style="width: 20rem;">
        <div class="Card-header">Featured</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 class="Card-footer Fg-muted">2 days ago</div>
      </div>
  

Sizing

Cards assume no specific width to start, so they’ll be 100% wide unless otherwise stated. You can change this as needed with custom CSS, grid classes, grid Sass mixins, or utilities.

Using grid markup

Using the grid, wrap Cards in columns and rows as needed.

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="Row">
    <div class="Col-12 Col-sm-6">
      <div class="Card">
        <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>
    </div>
    <div class="Col-12 Col-sm-6">
      <div class="Card">
        <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>
    </div>
  </div>
  
Using utilities

Use our handful of available sizing utilities to quickly set a Card’s width.

Card title

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

Button

Card title

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

Button
    <div class="Card W-75">
      <div class="Card-body">
        <h5 class="Card-title">Card title</h5>
        <p class="Card-text">With supporting text below as a natural lead-in to additional content.</p>
        <a href="#" class="Btn Btn-primary">Button</a>
      </div>
    </div>
<br>
    <div class="Card W-50">
      <div class="Card-body">
        <h5 class="Card-title">Card title</h5>
        <p class="Card-text">With supporting text below as a natural lead-in to additional content.</p>
        <a href="#" class="Btn Btn-primary">Button</a>
      </div>
    </div>
  
Using custom CSS

Use custom CSS in your stylesheets or as inline styles to set a width.

Card title

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

Button
    <div class="Card" style="width: 20rem;">
      <div class="Card-body">
        <h5 class="Card-title">Card title</h5>
        <p class="Card-text">With supporting text below as a natural lead-in to additional content.</p>
        <a href="#" class="Btn Btn-primary">Button</a>
      </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.

Card title

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

Button
Card title

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

Button
Card title

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

Button
    <div class="Card MB-2" style="width: 20rem;">
      <div class="Card-body">
        <h5 class="Card-title">Card title</h5>
        <p class="Card-text">With supporting text below as a natural lead-in to additional content.</p>
        <a href="#" class="Btn Btn-primary">Button</a>
      </div>
    </div>
    <div class="Card MB-2 Text-center" style="width: 20rem;">
      <div class="Card-body">
        <h5 class="Card-title">Card title</h5>
        <p class="Card-text">With supporting text below as a natural lead-in to additional content.</p>
        <a href="#" class="Btn Btn-primary">Button</a>
      </div>
    </div>
    <div class="Card MB-2 Text-end" style="width: 20rem;">
      <div class="Card-body">
        <h5 class="Card-title">Card title</h5>
        <p class="Card-text">With supporting text below as a natural lead-in to additional content.</p>
        <a href="#" class="Btn Btn-primary">Button</a>
      </div>
    </div>
  
Navigation

Add some Navigation to a Card’s header (or block) with MDB pills or tabs components.

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</a>
          </li>
          <li class="Nav-item">
            <a class="Nav-link" href="#">Link</a>
          </li>
          <li class="Nav-item">
            <a class="Nav-link disabled">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" aria-current="true" href="#">Active</a>
          </li>
          <li class="Nav-item">
            <a class="Nav-link" href="#">Link</a>
          </li>
          <li class="Nav-item">
            <a class="Nav-link disabled">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>
  

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.

Basic example

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

Random Img
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 3min 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

Random Img
    <div class="Card MB-3">
      <img class="Card-img-top" src="https://source.unsplash.com/random/940x400?sig=1" alt="Random Img"/>
      <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="Fg-muted">Last updated 3min ago</small>
        </p>
      </div>
    </div>
    <div class="Card">
      <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="Fg-muted">Last updated 3 mins ago</small>
        </p>
      </div>
      <img class="Card-img-bottom" src="https://source.unsplash.com/random/940x400?sig=1" alt="Random Img"/>
    </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.

Random nature,sunlight
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 min ago

    <div class="Card">
      <img class="Card-img" src="https://source.unsplash.com/random/940x400?sig=1" alt="Random Img"/>
      <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">
          <small class="Fg-muted">Last updated 3 min ago</small>
        </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.

Random Img
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 min ago

undefined
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 class="Card-img" src="https://source.unsplash.com/random/940x400?sig=1" alt="Random Img"/>
      <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">
          <small class="Fg-muted">Last updated 3 min ago</small>
        </p>
      </div>
    </div>
  

Card styles

Cards include various options for customizing their backgrounds, borders, and color.

Background and color

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

Header
Primary Card title

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

Header
Danger Card title

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

Header
Warning Card title

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

Header
Info Card title

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

Header
Light Card title

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

Header
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-1">
      <div class="Col-12 Col-sm-6">
        <div class="Card Bg-primary Fg-white">
          <div class="Card-header">Header</div>
          <div class="Card-body">
            <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-12 Col-sm-6">
        <div class="Card Bg-danger Fg-white">
          <div class="Card-header">Header</div>
          <div class="Card-body">
            <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-12 Col-sm-6">
        <div class="Card Bg-warning Fg-dark">
          <div class="Card-header">Header</div>
          <div class="Card-body">
            <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-12 Col-sm-6">
        <div class="Card Bg-info Fg-dark">
          <div class="Card-header">Header</div>
          <div class="Card-body">
            <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-12 Col-sm-6">
        <div class="Card Bg-light Fg-dark">
          <div class="Card-header">Header</div>
          <div class="Card-body">
            <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-12 Col-sm-6">
        <div class="Card Bg-dark Fg-white">
          <div class="Card-header">Header</div>
          <div class="Card-body">
            <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 .Fg-{color} classes on the parent .Card or a subset of the Card’s contents as shown below.

Header
Primary Card title

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

Header
Danger Card title

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

Header
Warning Card title

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

Header
Info Card title

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

Header
Light Card title

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

Header
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-1">
      <div class="Col-12 Col-sm-6">
        <div class="Card Bc-primary">
          <div class="Card-header">Header</div>
          <div class="Card-body Fg-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>
      </div>
      <div class="Col-12 Col-sm-6">
        <div class="Card Bc-danger">
          <div class="Card-header">Header</div>
          <div class="Card-body Fg-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>
      </div>
      <div class="Col-12 Col-sm-6">
        <div class="Card Bc-warning">
          <div class="Card-header">Header</div>
          <div class="Card-body Fg-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>
      </div>
      <div class="Col-12 Col-sm-6">
        <div class="Card Bc-info">
          <div class="Card-header">Header</div>
          <div class="Card-body Fg-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>
      </div>
      <div class="Col-12 Col-sm-6">
        <div class="Card Bc-light">
          <div class="Card-header">Header</div>
          <div class="Card-body">
            <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-12 Col-sm-6">
        <div class="Card Bc-dark">
          <div class="Card-header">Header</div>
          <div class="Card-body Fg-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>
      </div>
    </div>
  
Mixins utilities

You can also change the borders on the Card header and footer as needed, and even remove their background-color with .Bg-transparent.

Header
Success Card title

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

    <div class="Card Border Bc-success Shadow-0 MB-3" style="max-width: 18rem;">
      <div class="Card-header Bg-transparent Bc-success">Header</div>
      <div class="Card-body Fg-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 Bg-transparent Bc-success">Footer</div>
    </div>
  
Sass - Variables
$Card-bg                        : $Bg-surface;
$Card-color                     : $Fg-surface;
$Card-border-width              : $Border-width !default;
$Card-border-color              : rgba($Black, .01);
$Card-border-radius             : $Border-radius !default;
$Card-inner-border-radius       : calc(#{$Border-radius} - #{$Card-border-width}) !default;
$Card-margin-bottom             : .50rem;
$Card-box-shadow                : $Shadow;
$Card-spacer-y                  : $Spacer !default;
$Card-spacer-x                  : $Spacer !default;
$Card-title-spacer-y            : $Spacer * .5 !default;
$Card-cap-padding-y             : $Card-spacer-y * .5 !default;
$Card-cap-padding-x             : $Card-spacer-x !default;
$Card-cap-bg                    : hsla($Bg-accent-hsl, .05) !default;
$Card-cap-color                 : null !default;
$Card-img-overlay-padding       : $Spacer !default;