Planning a personal dashboard
Use cards for small content blocks, notes, and activity summaries.
Content container with shadow. Size variants include the base .card styles + a max-width constraint.
.card + .card-body (no max-width)
No max-width — stretches to its container.
<div class="card">
<div class="card-body">
<h3 class="h4">Card</h3>
<p class="mt-1 text-sm text-secondary-500">No max-width — stretches to its container.</p>
</div>
</div>
.card .card-sm — max-w-sm (384px)
Good for narrow widgets and callouts.
<div class="card card-sm">
<div class="card-body">
<h3 class="h4">Small card</h3>
<p class="mt-1 text-sm text-secondary-500">Good for narrow widgets and callouts.</p>
</div>
</div>
.card .card-md — max-w-md (448px)
Good for auth forms and login dialogs.
<div class="card card-md">
<div class="card-body">
<h3 class="h4">Medium card</h3>
<p class="mt-1 text-sm text-secondary-500">Good for auth forms and login dialogs.</p>
</div>
</div>
.card .card-lg — max-w-lg (512px)
Wider forms and content panels.
<div class="card card-lg">
<div class="card-body">
<h3 class="h4">Large card</h3>
<p class="mt-1 text-sm text-secondary-500">Wider forms and content panels.</p>
</div>
</div>
Media card — combine .card with an image and .card-body
Use cards for small content blocks, notes, and activity summaries.
<article class="card card-md">
<img src="https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=900&q=80" alt="Desk with a laptop and notebook" class="aspect-video w-full object-cover" />
<div class="card-body">
<div class="mb-2 flex flex-wrap gap-2">
<span class="badge badge-primary">Product</span>
<span class="badge badge-gray">4 min read</span>
</div>
<h3 class="h4">Planning a personal dashboard</h3>
<p class="mt-1 text-sm text-secondary-500">Use cards for small content blocks, notes, and activity summaries.</p>
</div>
</article>
Action card — header, body, and footer actions
Invite a collaborator to this workspace.
<section class="card card-md">
<div class="border-b border-gray-100 px-6 py-4">
<h3 class="h5">Team invite</h3>
<p class="mt-1 text-sm text-secondary-400">Invite a collaborator to this workspace.</p>
</div>
<div class="card-body">
<label class="form-label" for="invite-email">Email address</label>
<input id="invite-email" type="email" class="form-input" placeholder="[email protected]" />
</div>
<div class="flex justify-end gap-3 bg-secondary-50 px-6 py-3">
<button class="btn btn-secondary">Cancel</button>
<button class="btn btn-primary">Send invite</button>
</div>
</section>
List card — grouped records or settings
Backup completed
Database snapshot finished 12 minutes ago.
New signup
A user joined the private beta.
Invoice pending
Payment retry is scheduled for tomorrow.
<div class="card card-md">
<div class="border-b border-gray-100 px-6 py-4">
<h3 class="h5">Recent activity</h3>
</div>
<ul class="divide-y divide-gray-100">
<li class="flex items-start gap-3 px-6 py-4">
<span class="mt-1 badge-dot bg-green-500"></span>
<div>
<p class="text-sm font-medium text-secondary-900">Backup completed</p>
<p class="mt-0.5 text-sm text-secondary-400">Database snapshot finished 12 minutes ago.</p>
</div>
</li>
<li class="flex items-start gap-3 px-6 py-4">
<span class="mt-1 badge-dot bg-primary-500"></span>
<div>
<p class="text-sm font-medium text-secondary-900">New signup</p>
<p class="mt-0.5 text-sm text-secondary-400">A user joined the private beta.</p>
</div>
</li>
<li class="flex items-start gap-3 px-6 py-4">
<span class="mt-1 badge-dot bg-yellow-500"></span>
<div>
<p class="text-sm font-medium text-secondary-900">Invoice pending</p>
<p class="mt-0.5 text-sm text-secondary-400">Payment retry is scheduled for tomorrow.</p>
</div>
</li>
</ul>
</div>