🃏 Card Layouts
6 card layouts — responsive, copy-ready HTML + CSS
6 components. Pick one, check it in Preview, open Code to read it, then Copy code — you get the complete HTML and its CSS in one self-contained snippet, so it pastes in looking exactly like the preview.
HTML + CSS · self-contained16 lines
<article class="nxc1">
<div class="nxc1-img" aria-hidden="true"></div>
<h3 class="nxc1-title">Card title</h3>
<p class="nxc1-text">A short description of the card content goes here. Keep it to two or three lines.</p>
<a href="#" class="nxc1-link">Read more <span aria-hidden="true">→</span></a>
</article>
<style>
.nxc1, .nxc1 * { box-sizing: border-box; }
.nxc1 { width: 100%; max-width: 340px; margin: 0 auto; padding: 20px; background: #fff; border: 1px solid #ece4d8; border-radius: 18px; font-family: system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; color: #2a1f1a; transition: box-shadow .3s, transform .3s; }
.nxc1:hover { box-shadow: 0 14px 36px rgba(42,31,26,.1); transform: translateY(-2px); }
.nxc1-img { height: 160px; margin-bottom: 18px; border-radius: 12px; background: linear-gradient(135deg, #f3d9c4, #d99a7a 60%, #a24832); }
.nxc1-title { margin: 0 0 8px; font: 700 19px/1.3 Georgia,"Times New Roman",serif; }
.nxc1-text { margin: 0 0 16px; font-size: 14.5px; line-height: 1.55; color: #6d645a; }
.nxc1-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: #a24832; font-weight: 600; font-size: 14.5px; text-decoration: none; }
.nxc1-link:hover { text-decoration: underline; text-underline-offset: 4px; }
</style>
HTML + CSS · self-contained18 lines
<article class="nxc2">
<div class="nxc2-thumb" aria-hidden="true">📊</div>
<div class="nxc2-body">
<h3 class="nxc2-title">Horizontal layout</h3>
<p class="nxc2-text">Image and content side by side for compact lists. Stacks on small screens.</p>
</div>
</article>
<style>
.nxc2, .nxc2 * { box-sizing: border-box; }
.nxc2 { display: flex; gap: 20px; align-items: center; width: 100%; max-width: 520px; margin: 0 auto; padding: 20px; background: #fff; border: 1px solid #ece4d8; border-radius: 18px; font-family: system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; color: #2a1f1a; }
.nxc2-thumb { flex: 0 0 96px; height: 96px; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: #f5efe6; font-size: 34px; }
.nxc2-title { margin: 0 0 6px; font: 700 18px/1.3 Georgia,"Times New Roman",serif; }
.nxc2-text { margin: 0; font-size: 14.5px; line-height: 1.55; color: #6d645a; }
@media (max-width: 420px) {
.nxc2 { flex-direction: column; align-items: flex-start; }
.nxc2-thumb { flex-basis: auto; width: 100%; height: 120px; }
}
</style>
HTML + CSS · self-contained25 lines
<article class="nxc3">
<div class="nxc3-cover" aria-hidden="true"></div>
<div class="nxc3-avatar" aria-hidden="true">AK</div>
<h3 class="nxc3-name">Aria Kent</h3>
<p class="nxc3-role">Product Designer · Lisbon</p>
<div class="nxc3-stats">
<div><strong>128</strong><span>Posts</span></div>
<div><strong>4.2k</strong><span>Followers</span></div>
<div><strong>310</strong><span>Following</span></div>
</div>
<button type="button" class="nxc3-btn">Follow</button>
</article>
<style>
.nxc3, .nxc3 * { box-sizing: border-box; }
.nxc3 { width: 100%; max-width: 320px; margin: 0 auto; padding: 0 20px 22px; background: #fff; border: 1px solid #ece4d8; border-radius: 20px; overflow: hidden; text-align: center; font-family: system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; color: #2a1f1a; }
.nxc3-cover { height: 84px; margin: 0 -20px; background: linear-gradient(120deg, #2a1f1a, #a24832); }
.nxc3-avatar { width: 76px; height: 76px; margin: -38px auto 10px; display: flex; align-items: center; justify-content: center; border: 4px solid #fff; border-radius: 50%; background: #f0c9a8; color: #6b2a1a; font: 700 22px/1 system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; }
.nxc3-name { margin: 0; font: 700 19px/1.3 Georgia,"Times New Roman",serif; }
.nxc3-role { margin: 4px 0 16px; font-size: 13.5px; color: #6d645a; }
.nxc3-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 12px 0; margin-bottom: 16px; border-top: 1px solid #f0e9df; border-bottom: 1px solid #f0e9df; }
.nxc3-stats strong { display: block; font-size: 16px; }
.nxc3-stats span { font-size: 12px; color: #6d645a; }
.nxc3-btn { width: 100%; min-height: 44px; border: 0; border-radius: 999px; background: #2a1f1a; color: #faf6f0; font: 600 15px/1 system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; cursor: pointer; }
.nxc3-btn:hover { background: #a24832; }
</style>
HTML + CSS · self-contained27 lines
<div class="nxc4">
<div class="nxc4-card">
<span class="nxc4-label">Revenue</span>
<strong class="nxc4-value">$48.2k</strong>
<span class="nxc4-up">▲ 12.4% this month</span>
</div>
<div class="nxc4-card">
<span class="nxc4-label">New users</span>
<strong class="nxc4-value">1,284</strong>
<span class="nxc4-up">▲ 8.1% this month</span>
</div>
<div class="nxc4-card">
<span class="nxc4-label">Churn</span>
<strong class="nxc4-value">2.3%</strong>
<span class="nxc4-down">▼ 0.4% this month</span>
</div>
</div>
<style>
.nxc4, .nxc4 * { box-sizing: border-box; }
.nxc4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 14px; width: 100%; font-family: system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; color: #2a1f1a; }
.nxc4-card { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; background: #fff; border: 1px solid #ece4d8; border-radius: 16px; }
.nxc4-label { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #6d645a; }
.nxc4-value { font: 700 28px/1.15 Georgia,"Times New Roman",serif; }
.nxc4-up, .nxc4-down { font-size: 13px; font-weight: 600; }
.nxc4-up { color: #3f7a3a; }
.nxc4-down { color: #b83a3a; }
</style>
HTML + CSS · self-contained25 lines
<article class="nxc5">
<div class="nxc5-img" aria-hidden="true"><span class="nxc5-tag">New</span>👟</div>
<div class="nxc5-body">
<h3 class="nxc5-title">Trail Runner 2</h3>
<p class="nxc5-meta">Lightweight · 4 colours</p>
<div class="nxc5-row">
<span class="nxc5-price">$89 <s>$120</s></span>
<button type="button" class="nxc5-btn">Add to cart</button>
</div>
</div>
</article>
<style>
.nxc5, .nxc5 * { box-sizing: border-box; }
.nxc5 { width: 100%; max-width: 320px; margin: 0 auto; background: #fff; border: 1px solid #ece4d8; border-radius: 18px; overflow: hidden; font-family: system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; color: #2a1f1a; }
.nxc5-img { position: relative; height: 170px; display: flex; align-items: center; justify-content: center; background: #f1ebe2; font-size: 64px; }
.nxc5-tag { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px; background: #a24832; color: #fff; font: 700 11px/1.4 system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.nxc5-body { padding: 16px 18px 18px; }
.nxc5-title { margin: 0; font: 700 18px/1.3 Georgia,"Times New Roman",serif; }
.nxc5-meta { margin: 4px 0 14px; font-size: 13.5px; color: #6d645a; }
.nxc5-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.nxc5-price { font-size: 20px; font-weight: 700; }
.nxc5-price s { font-size: 14px; font-weight: 400; color: #9a9086; }
.nxc5-btn { min-height: 42px; padding: 10px 18px; border: 0; border-radius: 999px; background: #2a1f1a; color: #faf6f0; font: 600 14px/1 system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; cursor: pointer; }
.nxc5-btn:hover { background: #a24832; }
</style>
HTML + CSS · self-contained26 lines
<div class="nxc6">
<div class="nxc6-card">
<div class="nxc6-icon" aria-hidden="true">⚡</div>
<h3>Fast by default</h3>
<p>Pages load in under a second on any connection.</p>
</div>
<div class="nxc6-card">
<div class="nxc6-icon" aria-hidden="true">🔒</div>
<h3>Private</h3>
<p>Your data never leaves your device unless you say so.</p>
</div>
<div class="nxc6-card">
<div class="nxc6-icon" aria-hidden="true">🧩</div>
<h3>Composable</h3>
<p>Mix and match blocks to build any layout you need.</p>
</div>
</div>
<style>
.nxc6, .nxc6 * { box-sizing: border-box; }
.nxc6 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 16px; width: 100%; font-family: system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; color: #2a1f1a; }
.nxc6-card { padding: 22px; background: #fff; border: 1px solid #ece4d8; border-radius: 18px; transition: border-color .2s, transform .2s; }
.nxc6-card:hover { border-color: #a24832; transform: translateY(-2px); }
.nxc6-icon { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; border-radius: 12px; background: #f5efe6; font-size: 22px; }
.nxc6-card h3 { margin: 0 0 6px; font: 700 17px/1.3 Georgia,"Times New Roman",serif; }
.nxc6-card p { margin: 0; font-size: 14px; line-height: 1.55; color: #6d645a; }
</style>
Class names carry a unique prefix, so several snippets can sit on one page without clashing. Colours and fonts are plain CSS values — change them to match your brand.
What Is This?
- Collection of responsive card components
- Includes product, profile, feature, and blog post cards
- Clean, modern designs with live rendering
- Copy HTML and CSS with one click
- Combinable in grid layouts for complete sections
How to Use
- Browse the gallery of card layout designs
- Preview each card component with live rendering
- Copy the HTML and CSS code with one click
- Customize content, colors, and sizing for your project
- Combine cards in grid layouts for complete sections
Use Cases
- Building product listing and e-commerce card grids
- Creating team member profile cards for about pages
- Designing blog post preview cards with images
- Making feature highlight sections for landing pages
- Prototyping card-based UI layouts quickly