Cards
Bootstrap's cards provide a flexible and extensible content container with multiple variants and options.
We think cards are one of the best ways to organise your information. We went all out with possibilities and we recommended finding the right fit for your product. The general class for a card is called .card. The information inside the
card usually goes inside the content (class .card-body). The content can have three types of elements inside: .card-title and .category. You can optionally add a .card-footer, if you want to place a call-to-action. You can change the
color of the header using the card-header-*color
attribute like this: card-header-primary | info | success | warning | danger | rose
.
If you want to use the cards on white background you can remove it’s shadow using the class .card-plain
Cards Headers Type
The header of the cards start with the plain .card-header, then you can add other types of headers based on what you want to show like: .card-header-icon
or .card-header-text
.
Regular header
Category subtitle
Full header coloured
Category subtitle
Here is the Icon
The place is close to Barceloneta Beach and bus stop just 2 min by walk and near to "Naviglio" where you can enjoy the main night life in Barcelona...Here is the Text
<div class="row">
<div class="col-md-6">
<div class="card">
<div class="card-header">
<h4 class="card-title">Regular header</h4>
<p class="category">Category subtitle</p>
</div>
<div class="card-body">
The place is close to Barceloneta Beach and bus stop just 2 min by walk and near to "Naviglio" where you can enjoy the main night life in Barcelona...
</div>
</div>
</div>
<div class="col-md-6">
<div class="card">
<div class="card-header card-header-danger">
<h4 class="card-title">Full header coloured</h4>
<p class="category">Category subtitle</p>
</div>
<div class="card-body">
The place is close to Barceloneta Beach and bus stop just 2 min by walk and near to "Naviglio" where you can enjoy the main night life in Barcelona...
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="card">
<div class="card-header card-header-icon card-header-rose">
<div class="card-icon">
<i class="material-icons">language</i>
</div>
</div>
<div class="card-body">
<h4 class="card-title">Here is the Icon</h4>
The place is close to Barceloneta Beach and bus stop just 2 min by walk and near to "Naviglio" where you can enjoy the main night life in Barcelona...
</div>
</div>
</div>
<div class="col-md-6">
<div class="card">
<div class="card-header card-header-text card-header-primary">
<div class="card-text">
<h4 class="card-title">Here is the Text</h4>
</div>
</div>
<div class="card-body">
The place is close to Barceloneta Beach and bus stop just 2 min by walk and near to "Naviglio" where you can enjoy the main night life in Barcelona...
</div>
</div>
</div>
</div>
Cards with Animation
We’ve created some special cards that can have actions under the header, you can activate those cards but adding the property data-header-animation="true"
. Info: After 20x hovers of one of these cards you can break it :-)
To stop the break effect you can go to assets/js/material-dashboard.js
and find the variable breakCards = true
and set it to false
.
Website Views
Last Campaign Performance
<div class="row">
<div class="col-md-6 ml-auto mr-auto">
<div class="card card-chart">
<div class="card-header card-header-rose" data-header-animation="true">
<div class="ct-chart" id="websiteViewsChart"></div>
</div>
<div class="card-body">
<div class="card-actions">
<button type="button" class="btn btn-danger btn-link fix-broken-card">
<i class="material-icons">build</i> Fix Header!
</button>
<button type="button" class="btn btn-info btn-link" rel="tooltip" data-placement="bottom" title="Refresh">
<i class="material-icons">refresh</i>
</button>
<button type="button" class="btn btn-default btn-link" rel="tooltip" data-placement="bottom" title="Change Date">
<i class="material-icons">edit</i>
</button>
</div>
<h4 class="card-title">Website Views</h4>
<p class="card-category">Last Campaign Performance</p>
</div>
<div class="card-footer">
<div class="stats">
<i class="material-icons">access_time</i> campaign sent 2 days ago
</div>
</div>
</div>
</div>
</div>
Card Chart
Daily Sales
55% increase in today sales.
Completed Tasks
Last Campaign Performance
<div class="row">
<div class="col-md-6">
<div class="card">
<div class="card-header card-chart card-header-warning">
<div class="ct-chart" id="dailySalesChart"></div>
</div>
<div class="card-body">
<h4 class="card-title">Daily Sales</h4>
<p class="card-category"><span class="text-success"><i class="fa fa-long-arrow-up"></i> 55% </span> increase in today sales.</p>
</div>
<div class="card-footer">
<div class="stats">
<i class="material-icons">access_time</i> updated 4 minutes ago
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="card">
<div class="card-header card-chart card-header-success">
<div class="ct-chart" id="completedTasksChart"></div>
</div>
<div class="card-body">
<h4 class="card-title">Completed Tasks</h4>
<p class="card-category">Last Campaign Performance</p>
</div>
<div class="card-footer">
<div class="stats">
<i class="material-icons">access_time</i> updated 2 minutes ago
</div>
</div>
</div>
</div>
</div>
// INFO: #dailySalesChart is initialised inside assets/js/material-dashboard.js on method initDocumentationCharts()
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.
<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 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="#0" class="card-link">Card link</a>
<a href="#0" 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.
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://images.unsplash.com/photo-1517303650219-83c8b1788c4c?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=bd4c162d27ea317ff8c67255e955e3c8&auto=format&fit=crop&w=2691&q=80" 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>
- Cras justo odio
- Dapibus ac facilisis in
- Vestibulum at eros
<div class="card card-nav-tabs" style="width: 20rem;">
<div class="card-header card-header-danger">
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>
Header and footer
Add an optional header and/or footer within a card.
Special title treatment
With supporting text below as a natural lead-in to additional content.
Go somewhere<div class="card card-nav-tabs">
<div class="card-header card-header-warning">
Featured
</div>
<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="#0" 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 card-nav-tabs">
<h4 class="card-header card-header-info">Featured</h4>
<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="#0" class="btn btn-primary">Go somewhere</a>
</div>
</div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
<div class="card card-nav-tabs">
<div class="card-header card-header-success">
Quote
</div>
<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>
Special title treatment
With supporting text below as a natural lead-in to additional content.
Go somewhere<div class="card card-nav-tabs text-center">
<div class="card-header card-header-primary">
Featured
</div>
<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="#0" class="btn btn-primary">Go somewhere</a>
</div>
<div class="card-footer text-muted">
2 days ago
</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 somewhereSpecial title treatment
With supporting text below as a natural lead-in to additional content.
Go somewhereSpecial 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="#0" 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="#0" 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="#0" class="btn btn-primary">Go somewhere</a>
</div>
</div>
Navigation
Add some navigation to a card’s header (or block) with Bootstrap’s nav 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 card-header-rose">
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link active" href="#0">Active</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#0">Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#0">Disabled</a>
</li>
</ul>
</div>
<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="#0" 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" href="#0">Active</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#0">Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#0">Disabled</a>
</li>
</ul>
</div>
<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="#0" 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 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
<div class="card mb-3">
<img class="card-img-top" src="https://images.unsplash.com/photo-1517303650219-83c8b1788c4c?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=bd4c162d27ea317ff8c67255e955e3c8&auto=format&fit=crop&w=2691&q=80" 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="https://images.unsplash.com/photo-1517303650219-83c8b1788c4c?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=bd4c162d27ea317ff8c67255e955e3c8&auto=format&fit=crop&w=2691&q=80" 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.
<div class="card bg-dark text-white">
<img class="card-img" src="https://images.unsplash.com/photo-1517303650219-83c8b1788c4c?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=bd4c162d27ea317ff8c67255e955e3c8&auto=format&fit=crop&w=2691&q=80" 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
Fashion
Don't be scared of the truth because we need to restart the human foundation in truth And I love you like Kanye loves Kanye I love Rick Owens’ bed design but the back is...
<div class="card card-blog">
<div class="card-header card-header-image">
<a href="#pablo">
<img class="img" src="https://images.unsplash.com/photo-1511439817358-bee8e21790b5?auto=format&fit=crop&w=750&q=80&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D">
<div class="card-title">
This Summer Will be Awesome
</div>
</a>
</div>
<div class="card-body">
<h6 class="card-category text-info">Fashion</h6>
<p class="card-description">
Don't be scared of the truth because we need to restart the human foundation in truth And I love you like Kanye loves Kanye I love Rick Owens’ bed design but the back is...
</p>
</div>
</div>
"You Don't Have to Sacrifice Joy to Build a Fabulous Business and Life"
<div class="card bg-info">
<div class="card-body">
<h5 class="card-category card-category-social">
<i class="fa fa-twitter"></i> Twitter
</h5>
<h4 class="card-title">
<a href="#pablo">"You Don't Have to Sacrifice Joy to Build a Fabulous Business and Life"</a>
</h4>
<div class="card-stats">
<div class="author">
<a href="#pablo">
<img src="https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?auto=format&fit=crop&w=334&q=80&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D" alt="..." class="avatar img-raised">
<span>Tania Andrew</span>
</a>
</div>
<div class="stats ml-auto">
<i class="material-icons">favorite</i> 2.4K ·
<i class="material-icons">share</i> 45
</div>
</div>
</div>
</div>
trending_up Trending
To Grow Your Business Start Focusing on Your Employees
<div class="card">
<div class="card-body ">
<h6 class="card-category text-danger">
<i class="material-icons">trending_up</i> Trending
</h6>
<h4 class="card-title">
<a href="#pablo">To Grow Your Business Start Focusing on Your Employees</a>
</h4>
</div>
<div class="card-footer ">
<div class="author">
<a href="#pablo">
<img src="https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?auto=format&fit=crop&w=334&q=80&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D" alt="..." class="avatar img-raised">
<span>Lord Alex</span>
</a>
</div>
<div class="stats ml-auto">
<i class="material-icons">favorite</i> 342 ·
<i class="material-icons">chat_bubble</i> 45
</div>
</div>
</div>
Profile Card
<div class="card card-profile ml-auto mr-auto" style="max-width: 360px">
<div class="card-header card-header-image">
<a href="#pablo">
<img class="img" src="https://images.unsplash.com/photo-1492447273231-0f8fecec1e3a?auto=format&fit=crop&w=334&q=80&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D">
</a>
</div>
<div class="card-body ">
<h4 class="card-title">Alec Thompson</h4>
<h6 class="card-category text-gray">CEO / Co-Founder</h6>
</div>
<div class="card-footer justify-content-center">
<a href="#pablo" class="btn btn-just-icon btn-twitter btn-round">
<i class="fa fa-twitter"></i>
</a>
<a href="#pablo" class="btn btn-just-icon btn-facebook btn-round">
<i class="fa fa-facebook-square"></i>
</a>
<a href="#pablo" class="btn btn-just-icon btn-google btn-round">
<i class="fa fa-google"></i>
</a>
</div>
</div>
Full Background Card
Productivy Apps
The Best Productivity Apps on Market
Don't be scared of the truth because we need to restart the human foundation in truth And I love you like Kanye loves Kanye I love Rick Owens’ bed design but the back is...
subject Read Article watch_later Watch Later<div class="card card-background" style="background-image: url('https://images.unsplash.com/photo-1497366811353-6870744d04b2?auto=format&fit=crop&w=750&q=80&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D')">
<div class="card-body">
<h6 class="card-category text-info">Productivy Apps</h6>
<a href="#pablo">
<h3 class="card-title">The Best Productivity Apps on Market</h3>
</a>
<p class="card-description">
Don't be scared of the truth because we need to restart the human foundation in truth And I love you like Kanye loves Kanye I love Rick Owens’ bed design but the back is...
</p>
<a href="#pablo" class="btn btn-white btn-link">
<i class="material-icons">subject</i> Read Article
</a>
<a href="#pablo" class="btn btn-white btn-link">
<i class="material-icons">watch_later</i> Watch Later
</a>
</div>
</div>
Pricing Card
<div class="row">
<div class="col-md-4 ml-auto mr-auto">
<div class="card card-pricing bg-primary"><div class="card-body ">
<div class="card-icon">
<i class="material-icons">business</i>
</div>
<h3 class="card-title">$69</h3>
<p class="card-description">
This is good if your company size is between 11 and 99 Persons.
</p>
<a href="#pablo" class="btn btn-white btn-round">Choose Plan</a>
</div>
</div>
</div>
</div>
Rotating Card
Full Background Card
This Background Card Will Rotate on Hover
Don't be scared of the truth because we need to restart the human foundation in truth And I love you like Kanye loves Kanye I love Rick Owens’ bed design but the back is...
Manage Post
As an Admin, you have shortcuts to edit, view or delete the posts.
<div class="row">
<div class="col-md-6 ml-auto mr-auto">
<div class="rotating-card-container">
<div class="card card-rotate card-background">
<div class="front front-background" style="background-image:url('https://images.unsplash.com/photo-1493787039806-2edcbe808750?auto=format&fit=crop&w=750&q=80&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D');">
<div class="card-body">
<h6 class="card-category">Full Background Card</h6>
<a href="#pablo">
<h3 class="card-title">This Background Card Will Rotate on Hover</h3>
</a>
<p class="card-description">
Don't be scared of the truth because we need to restart the human foundation in truth And I love you like Kanye loves Kanye I love Rick Owens’ bed design but the back is...
</p>
</div>
</div>
<div class="back back-background" style="background-image: url('https://images.unsplash.com/photo-1493787039806-2edcbe808750?auto=format&fit=crop&w=750&q=80&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D');">
<div class="card-body">
<h5 class="card-title">
Manage Post
</h5>
<p class="card-description">As an Admin, you have shortcuts to edit, view or delete the posts.</p>
<div class="footer justify-content-center">
<a href="#pablo" class="btn btn-info btn-just-icon btn-fill btn-round">
<i class="material-icons">subject</i>
</a>
<a href="#pablo" class="btn btn-success btn-just-icon btn-fill btn-round btn-wd">
<i class="material-icons">mode_edit</i>
</a>
<a href="#pablo" class="btn btn-danger btn-just-icon btn-fill btn-round">
<i class="material-icons">delete</i>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>