Cards

Responsive cards built with the latest Bootstrap 5. Card is a responsive content container with an extensible option for headers, footers, images, and a wide variety of content. Many examples and tutorials.

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.

Basic examples

Below are examples of basic cards 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.

To control the width of the card place it in the grid, use the sizing utilities, or set the width inline. You can learn more in the sizing section.

Simple

Card title

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


                              
                                
                              
                            

Image

Card title

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


                              
                                
                              
                            

Header and footer

Featured
Special title treatment

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

Button

                            
                              
                            
                          

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 .cd-card-body. Use it whenever you need a padded section within a card.

This is some text within a card body.

                            
                              
                            
                          

Titles, text, and links

Card titles are used by adding .cd-card-title to a <h*> tag. In the same way, links are added and placed next to each other by adding .cd-card-link to an tag.

Subtitles are used by adding a .cd-card-subtitle to a <h*> tag. If the .cd-card-title and the .cd-card-subtitle items are placed in a .cd-card-body item, the card title and subtitle are aligned nicely.


                            
                              
                            
                          

List groups

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

  • Cras justo odio
  • Dapibus ac facilisis in
  • Vestibulum at eros

                            
                              
                            
                          

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.


                            
                              
                            
                          

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

Featured
Special title treatment

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


                            
                              
                            
                          

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.

Featured
Special title treatment

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

Featured
Special title treatment

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


                            
                              
                            
                          

Navigation

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

Special title treatment

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


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

Special title treatment

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


                            
                              
                            
                          

Card layout

In addition to styling the content within cards, Bootstrap includes a few options for laying out series of cards. For the time being, these layout options are not yet responsive.

Card groups

Use card groups to render cards as a single, attached element with equal width and height columns. Card groups start off stacked and use display: flex; to become attached with uniform dimensions starting at the sm breakpoint.

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


                            
                              
                            
                          

Grid cards

Use the Bootstrap grid system and its .row-cols classes to control how many grid columns (wrapped around your cards) you show per row. For example, here’s .row-cols-1 laying out the cards on one column, and .row-cols-md-2 splitting four cards to equal width across multiple rows, from the medium breakpoint up.

...
Card title

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

...
Card title

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

...
Card title

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

...
Card title

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


                            
                              
                            
                          

Change it to .row-cols-3 and you’ll see the fourth card wrap.

...
Card title

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

...
Card title

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

...
Card title

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

...
Card title

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


                            
                              
                            
                          

When you need equal height, add .h-100

...
Card title

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

...
Card title

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

...
Card title

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

...
Card title

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