Skip to the page content

Cards

Containers for one piece of content, from plain to sortable.

18 card types

Basic card

Bootstrap's plain card: .card-title, .card-subtitle, .card-text and .card-link, in the Basalt type and colors.

Basics

Stockist price list

Updated October 1

New autumn prices for stockists, with the discount at 25 and 100 units.

Open the list Download PDF
Show code
<div class="card">
  <div class="card-body">
    <h3 class="card-title">Stockist price list</h3>
    <p class="card-subtitle mb-2">Updated October 1</p>
    <p class="card-text">New autumn prices for stockists.</p>
    <a href="#" class="card-link">Open the list</a>
    <a href="#" class="card-link">Download PDF</a>
  </div>
</div>

Header and footer

Bootstrap's .card-header and .card-footer, for a title with a badge on top and a time and link at the foot.

Basics
Order #4821 Paid

Six Sculpted Shoulder Blazers for Arbor North Studio

With gift boxes, to go out with Thursday's courier.

Show code
<div class="card">
  <div class="card-header">Order #4821 <span class="badge">Paid</span></div>
  <div class="card-body">
    <h3 class="card-title">Six Sculpted Shoulder Blazers for Arbor North Studio</h3>
    <p class="card-text">With vehicle mounts, to be sent on Thursday.</p>
  </div>
  <div class="card-footer">
    <small>Placed 14 minutes ago</small> <a href="order-details.html">View order</a>
  </div>
</div>

List group card

A flush list group inside a card, with a header. Each row can carry a value at the end.

Basics
Next onboarding calls
  • Avocet RoboticsTue 9:00 am
  • Harborline AITue 11:30 am
  • Copperleaf DesignWed 8:15 am
  • Tidewater SwimwearThu 2:00 pm
Show code
<div class="card">
  <div class="card-header">Next onboarding calls</div>
  <ul class="list-group list-group-flush">
    <li class="list-group-item d-flex justify-content-between">
      <span>Avocet Robotics</span><span>Tue 9:00 am</span>
    </li>
    <!-- more rows -->
  </ul>
</div>

Card navigation

Tabs in the header with .card-header-tabs, switched by Bootstrap's tab script. Arrow keys move between the tabs.

Basics

Tiered Organza Dress

Hand-pleated organza tiers over a corset bodice. $1,680, made to order.

Sizing

Pick your shoe size and a color mix at checkout, and change either from your account at any time.

4.6 from 88 reviews

“Warm, soft and they still look new after a whole winter.”

Show code
<div class="card">
  <div class="card-header">
    <ul class="nav nav-tabs card-header-tabs" role="tablist">
      <li class="nav-item" role="presentation">
        <button class="nav-link active" id="tab-1" data-bs-toggle="tab" data-bs-target="#pane-1"
                type="button" role="tab" aria-controls="pane-1" aria-selected="true">About</button>
      </li>
      <!-- more tabs -->
    </ul>
  </div>
  <div class="card-body tab-content">
    <div class="tab-pane fade show active" id="pane-1" role="tabpanel" aria-labelledby="tab-1" tabindex="0">…</div>
  </div>
</div>

Accent card

A colored edge and icon mark what a card is about. Bootstrap's border-* utilities stay in its own blue, green and red, so this takes the color from the palette instead.

Basics

In stock

1,284 units

Across 9 pieces and accessories

Shipped today

96 orders

All before the 4 pm cut-off

Running low

3 products

Sculpted Shoulder Blazer has 12 left

Payment failed

2 orders

Cards declined this morning

Show code
<!-- --primary, --success, --warning or --danger -->
<div class="card basalt-card-accent basalt-card-accent-warning">
  <div class="card-body">
    <span class="basalt-card-accent-icon" aria-hidden="true"><i class="bi bi-exclamation-triangle"></i></span>
    <p class="basalt-card-accent-label">Running low</p>
    <p class="basalt-card-accent-value">3 products</p>
    <p class="basalt-card-accent-note">Sculpted Shoulder Blazer has 12 left</p>
  </div>
</div>

Horizontal card

Picture beside the text, from Bootstrap's grid inside the card. It stacks on narrow screens.

Layout

Sculpted Shoulder Blazer

Sculpted shoulders and a nipped waist, built by hand. Our most ordered piece for three years running.

Restocked 2 days ago

Show code
<div class="card">
  <div class="row g-0">
    <div class="col-sm-4">
      <img src="blazer.jpg" class="img-fluid rounded-start" alt="">
    </div>
    <div class="col-sm-8">
      <div class="card-body">
        <h3 class="card-title">Sculpted Shoulder Blazer</h3>
        <p class="card-text">A 10-inch screen you can read on a roof at noon.</p>
        <p class="card-text"><small>Restocked 2 days ago</small></p>
      </div>
    </div>
  </div>
</div>

Card group

Bootstrap's .card-group joins cards edge to edge at equal height. Below 576px they stack.

Layout

Basic

Scheduling, invoices and the mobile app for a small team.

Pro

The schedule board, travel planning and care plans for several crews.

Max

Territories, single sign-on and a named account manager.

Show code
<div class="card-group">
  <div class="card">
    <div class="card-body">
      <h3 class="card-title">Basic</h3>
      <p class="card-text">Scheduling, invoices and the mobile app.</p>
    </div>
    <div class="card-footer"><small>$15 a seat a month</small></div>
  </div>
  <div class="card">…</div>
  <div class="card">…</div>
</div>

Image caps

A picture at the top or the bottom with .card-img-top and .card-img-bottom. The corners follow the card's radius.

Media

Draped Column Gown

Cobalt silk jersey, draped by hand.

Chalk-Stripe Suit

Light and warm, for cold mornings out.

Show code
<div class="card">
  <img src="phone-r5.jpg" class="card-img-top" alt="">
  <div class="card-body">
    <h3 class="card-title">Draped Column Gown</h3>
    <p class="card-text">Cobalt silk jersey, draped by hand.</p>
  </div>
</div>

<div class="card">
  <div class="card-body">…</div>
  <img src="label-printer.jpg" class="card-img-bottom" alt="">
</div>

Image overlay

Bootstrap's .card-img-overlay lays the text over the picture. The text sits on a solid panel at the foot, so it reads over any image in any palette.

Media

October release

Rounds that know the terrain

Travel Planner now plans around mountain passes and closed roads.

Show code
<div class="card">
  <img src="travel.jpg" class="card-img" alt="">
  <div class="card-img-overlay">
    <div class="cd-overlay-panel">
      <h3 class="card-title">Rounds that know the terrain</h3>
      <p class="card-text">Travel Planner now plans around mountain passes and closed roads.</p>
    </div>
  </div>
</div>

Media card

A picture on top, then the details. On hover the card lifts and the picture leans in; the heart saves it and the button confirms in place. The title link covers the card, and the two buttons sit above it so they stay clickable.

Media
New

Clothing · Hollis Atelier

Sculpted Shoulder Blazer

Grain de poudre wool, built in Akron

$1,290 4.8 out of 5, (212)

Clothing · Hollis Atelier

Draped Column Gown

Cobalt silk jersey, one shoulder

$2,150 4.6 out of 5, (88)
Low stock

Clothing · Willamette Tailors

Chalk-Stripe Suit

Indigo with an ivory chalk stripe

$2,450 4.9 out of 5, (341)
Show code
<article class="card basalt-media-card">
  <div class="basalt-media-card-media">
    <img src="blazer.jpg" alt="">  <!-- or an inline svg -->
    <span class="basalt-media-card-badge">New</span>
    <button type="button" class="basalt-media-card-fav" aria-pressed="false"
            aria-label="Save Sculpted Shoulder Blazer to favorites">
      <i class="bi bi-heart" aria-hidden="true"></i>
    </button>
  </div>
  <div class="basalt-media-card-body">
    <p class="basalt-media-card-meta">Clothing · Hollis Atelier</p>
    <h3 class="basalt-media-card-title">
      <a class="stretched-link" href="product-details.html">Sculpted Shoulder Blazer</a>
    </h3>
    <p class="basalt-media-card-notes">Grain de poudre wool, built in Akron</p>
    <div class="basalt-media-card-foot">
      <span class="basalt-media-card-price">$1,290</span>
      <span class="basalt-media-card-rating"><i class="bi bi-star-fill"></i>4.8</span>
    </div>
    <button type="button" class="btn btn-sm btn-outline-secondary basalt-media-card-add">
      Add to cart
    </button>
  </div>
</article>

Loading card

While a card waits for data it keeps its shape, with shimmering blocks where the text will go, so nothing jumps when the content lands. The card is marked busy for screen readers.

States

Lakeside Apparel

Customer since March 2023 · Eugene

Plan
Pro
Seats
18
Monthly
$576
Show code
<!-- While loading: aria-busy="true" on the card, content hidden, skeleton shown -->
<article class="card" aria-busy="true">
  <div class="card-body">
    <span class="basalt-skeleton basalt-skeleton-circle"></span>
    <span class="basalt-skeleton basalt-skeleton-line w-50"></span>
    <span class="basalt-skeleton basalt-skeleton-line basalt-skeleton-sm"></span>
    <span class="basalt-skeleton basalt-skeleton-block"></span>
  </div>
</article>

Dismissible card

A card the reader can put away. It folds out of the stack and leaves an undo bar with a short timer; undo brings it back where it was and returns focus to it.

States

Free shipping over $500

Shop orders over $500 ship free to any address in the US.

Seats renew on the 1st

Add or remove team members before then and the next invoice follows.

Tip: add visit checklists

Visits with a checklist close out about a fifth faster.

Show code
<div class="basalt-dismiss-stack" data-basalt-dismiss-stack>
  <article class="card basalt-dismiss-card" data-basalt-dismiss aria-labelledby="tip-1">
    <span class="basalt-dismiss-card-icon" aria-hidden="true"><i class="bi bi-truck"></i></span>
    <div class="basalt-dismiss-card-body">
      <h3 class="basalt-dismiss-card-title" id="tip-1">Free shipping over $500</h3>
      <p class="basalt-dismiss-card-text">Store orders over $500 ship free.</p>
    </div>
    <button type="button" class="btn-close" data-basalt-dismiss-close
            aria-label="Hide “Free shipping over $500”"></button>
  </article>
</div>
<!-- The script adds an undo bar in the card's place:
     <div class="basalt-undo-bar">… <button>Undo</button><span class="basalt-undo-bar-time"></span></div> -->

Stat card

One number, how it moved, and a sparkline of the path it took. The period switch redraws every card, and the figures count to their new value.

Data

Revenue

$21,730

Up 9.6% on the week before

Orders

412

Up 6.9% on the week before

Refunds

9

Down 2.0% on the week before

Show code
<article class="card basalt-trend-card">
  <div class="basalt-trend-card-top">
    <h3 class="basalt-trend-card-label">Revenue</h3>
    <span class="basalt-trend-card-icon" aria-hidden="true"><i class="bi bi-cash-stack"></i></span>
  </div>
  <p class="basalt-trend-card-value">$21,730</p>
  <!-- is-up or is-down picks the color and arrow -->
  <p class="basalt-trend-card-delta is-up">
    <i class="bi bi-arrow-up-right" aria-hidden="true"></i>
    <!-- the arrow is for the eye only: say the direction in words -->
    <span class="visually-hidden">Up </span>9.6%
    <span class="basalt-trend-card-vs">on the week before</span>
  </p>
  <div class="basalt-trend-card-spark" aria-hidden="true">
    <svg viewBox="0 0 120 40" preserveAspectRatio="none">
      <path class="basalt-trend-card-area" d="M0 40 L0 30 … L120 40 Z"/>
      <path class="basalt-trend-card-line" d="M0 30 L20 26 … L120 8"/>
    </svg>
  </div>
</article>

The whole card is one link, using Bootstrap's .stretched-link. It lifts on hover, the arrow nudges forward, and keyboard focus rings the whole card rather than the title alone.

Interactive
Show code
<article class="card basalt-card-link">
  <span class="basalt-card-link-icon" aria-hidden="true"><i class="bi bi-kanban"></i></span>
  <h3 class="basalt-card-link-title">
    <a class="stretched-link" href="handbook.html">Set up the schedule board</a>
  </h3>
  <p class="basalt-card-link-text">Territories, crews and your first rounds in five steps.</p>
  <span class="basalt-card-link-go" aria-hidden="true">Read the guide<i class="bi bi-arrow-right"></i></span>
</article>

Widget card

A dashboard card with its own tools: refresh, fold away, open full screen, and a menu with remove and undo. Press Escape to leave full screen.

Interactive

Top sellers this week

Updated 4 minutes ago

  1. Bar Loafers 184
  2. Two-Tone Oxfords 152
  3. Shield Sunglasses 121
  4. Sculpted Shoulder Blazer 96
  5. Leather Trench Coat 74

Show code
<section class="card basalt-widget" data-basalt-widget aria-labelledby="w-title">
  <div class="basalt-widget-head">
    <div class="basalt-widget-heading">
      <h3 class="basalt-widget-title" id="w-title">Top sellers this week</h3>
      <p class="basalt-widget-sub" data-basalt-widget-stamp>Updated 4 minutes ago</p>
    </div>
    <div class="basalt-widget-tools">
      <button type="button" class="basalt-widget-tool"
              data-basalt-widget-action="refresh" aria-label="Refresh">…</button>
      <button type="button" class="basalt-widget-tool" data-bs-toggle="collapse"
              data-bs-target="#w-body" aria-expanded="true" aria-controls="w-body"
              aria-label="Show or hide the list">…</button>
      <button type="button" class="basalt-widget-tool"
              data-basalt-widget-action="fullscreen" aria-pressed="false"
              aria-label="Full screen">…</button>
      <!-- a Bootstrap dropdown with data-basalt-widget-action="remove" -->
    </div>
  </div>
  <div class="collapse show" id="w-body">
    <div class="basalt-widget-body">…</div>
  </div>
  <span class="basalt-widget-progress" aria-hidden="true"></span>
</section>
<div class="basalt-widget-removed" data-basalt-widget-removed hidden>
  Top sellers removed. <button type="button" data-basalt-widget-undo>Undo</button>
</div>

Flip card

Two faces in one place. The button turns the card over and moves focus to the other side; the hidden face is taken out of the tab order. With reduced motion it fades instead of turning.

Interactive

Senior carer · Home care · North

Dana Whitfield

Dementia care and night visits. Leads the Tuesday crew at Oakhaven Studio.

This month

Dana Whitfield

Care notes done
On time
Customer rating
Visits
64
Hours
152
Complaints
1
Show code
<div class="basalt-flip-card" data-basalt-flip>
  <div class="basalt-flip-card-inner">
    <section class="card basalt-flip-card-face basalt-flip-card-front" aria-label="Dana Whitfield, front">
      <div class="basalt-flip-card-body">
        …
        <button type="button" class="btn btn-sm btn-outline-secondary"
                data-basalt-flip-toggle aria-controls="flip-back">This month</button>
      </div>
    </section>
    <!-- inert until the card is turned; the script swaps it -->
    <section class="card basalt-flip-card-face basalt-flip-card-back" id="flip-back"
             aria-label="Dana Whitfield, this month" inert>
      <div class="basalt-flip-card-body">
        …
        <button type="button" class="btn btn-sm btn-outline-secondary"
                data-basalt-flip-toggle aria-controls="flip-back">Back to profile</button>
      </div>
    </section>
  </div>
</div>

Sortable cards

Reorder a stack of cards by dragging the handle. From the keyboard: Space picks a card up, the arrow keys move it, Space drops it and Escape puts it back. Each move is read out.

Interactive

Drag the handle, or focus it and press Space, then the arrow keys.

  1. Today's visitsMap and the next eight visits
  2. Unassigned bookingsVisits still waiting for a team member
  3. Supplies in carsLow stock by crew and territory
  4. Overdue invoicesSorted by days late

Show code
<p id="sort-help">Drag the handle, or focus it and press Space, then the arrow keys.</p>
<ol class="basalt-sortable-cards" data-basalt-sortable-cards aria-label="Dashboard sections">
  <li class="basalt-sortable-cards-item" data-basalt-sortable-cards-item data-label="Today's visits">
    <button type="button" class="basalt-sortable-cards-handle"
            aria-label="Move Today's visits" aria-describedby="sort-help">
      <i class="bi bi-grip-vertical" aria-hidden="true"></i>
    </button>
    <span class="basalt-sortable-cards-icon" aria-hidden="true"><i class="bi bi-calendar-check"></i></span>
    <span class="basalt-sortable-cards-body">
      <span class="basalt-sortable-cards-title">Today's visits</span>
      <span class="basalt-sortable-cards-meta">Map and the next eight visits</span>
    </span>
    <span class="basalt-sortable-cards-pos" aria-hidden="true" data-basalt-sortable-cards-pos>1</span>
  </li>
  <!-- more items -->
</ol>
<p class="visually-hidden" aria-live="assertive" data-basalt-sortable-cards-live></p>

Selectable card

Cards that work as radio buttons or checkboxes. The whole card is the label, so a click anywhere picks it and the arrow keys move between options. Built on real inputs, so it posts with a form and works without script.

Interactive
Plan
Add-ons Pick any

Pro with the customer portal: $36.00 a seat a month

Show code
<fieldset class="basalt-choice-set">
  <legend class="basalt-choice-set-legend">Plan</legend>
  <div class="basalt-choice-grid">
    <label class="basalt-choice-card">
      <input class="basalt-choice-card-input" type="radio" name="plan" value="Pro" checked>
      <span class="basalt-choice-card-mark" aria-hidden="true"><i class="bi bi-check-lg"></i></span>
      <span class="basalt-choice-card-icon" aria-hidden="true"><i class="bi bi-people"></i></span>
      <span class="basalt-choice-card-tag">Most chosen</span>
      <span class="basalt-choice-card-title">Pro</span>
      <span class="basalt-choice-card-text">Adds the schedule board.
        <span class="basalt-choice-card-price">$32.00</span></span>
    </label>
    <!-- more options; add disabled to the input for one that can't be picked -->
  </div>
</fieldset>

<!-- Checkboxes in a row layout -->
<div class="basalt-choice-grid basalt-choice-grid-rows">
  <label class="basalt-choice-card basalt-choice-card-row">
    <input class="basalt-choice-card-input" type="checkbox" name="addon" value="customer portal">
    <span class="basalt-choice-card-mark" aria-hidden="true"><i class="bi bi-check-lg"></i></span>
    <span class="basalt-choice-card-title">Customer portal</span>
    <span class="basalt-choice-card-text">Customers book visits and pay invoices online.</span>
  </label>
</div>