22 examples Responsive intermediate

22 CSS Stacked Card Designs

22 free CSS stacked-card designs — depth stacks, hover reveals, interactive selectors and 3D layouts. Each demo includes copy-paste HTML and CSS.

22 unique stacks 16 Pure CSS 6 CSS + JS WCAG-friendly Mobile-first MIT licensed
01 / 22
Classic Deck
CSS + JS

Notes

3 items

Tasks

7 items

Inbox

12 messages

Three cards stacked with progressive scale-down — click anywhere to cycle the top card to the back of the deck.
.scd-deck {
  position: relative; width: 220px; height: 140px; margin: 0 auto;
  cursor: pointer;
}
.scd-deck__c {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 14px; padding: 18px 20px;
  color: #fff;
  box-shadow: 0 12px 30px -12px rgba(99,102,241,0.6);
  transform: translateY(calc(var(--i) * -10px)) scale(calc(1 - var(--i) * 0.05));
  z-index: calc(10 - var(--i));
  transition: transform .45s cubic-bezier(.3,1.2,.4,1), z-index 0s .22s;
}
.scd-deck__c h4 { margin: 0 0 6px; font: 700 14px/1 system-ui, sans-serif; }
.scd-deck__c p  { margin: 0; font: 12px/1 system-ui, sans-serif; opacity: 0.78; }
<div class="scd-deck scd-cycle" tabindex="0">
  <div class="scd-deck__c" style="--i:2"><h4>Notes</h4><p>3 items</p></div>
  <div class="scd-deck__c" style="--i:1"><h4>Tasks</h4><p>7 items</p></div>
  <div class="scd-deck__c" style="--i:0"><h4>Inbox</h4><p>12 messages</p></div>
</div>
/* Click-to-cycle: send the front card to the back of the deck.
   Uses the shared scd-cycle helper — works for any stacked-card demo
   whose children use a CSS custom property --i for depth ordering. */
document.querySelectorAll('.scd-cycle').forEach(function(stack) {
  stack.addEventListener('click', function() {
    var cards = Array.from(stack.children);
    var max = cards.length - 1;
    cards.forEach(function(card) {
      var current = parseInt(card.style.getPropertyValue('--i') || '0', 10);
      var next = current === 0 ? max : current - 1;
      card.style.setProperty('--i', next);
    });
  });
});
02 / 22
Fan Spread
CSS + JS
A♠
K♥
Q♦
Three cards angled like a hand of playing cards — click to cycle the center card around the fan.
.scd-fan {
  position: relative; width: 240px; height: 170px; margin: 0 auto;
  cursor: pointer;
}
.scd-fan__c {
  position: absolute; left: 50%; top: 50%;
  width: 88px; height: 124px; margin: -62px 0 0 -44px;
  background: #fdf6e3; color: #1a1a24;
  border-radius: 10px;
  font: 800 24px/1 ui-serif, Georgia;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.35), 0 0 0 1px rgba(0,0,0,0.06);
  transition: transform .5s cubic-bezier(.3,1.2,.4,1), color .3s, z-index 0s .25s;
  z-index: calc(10 - var(--i));
}
.scd-fan__c[data-i="0"] { transform: rotate(-14deg) translate(-50px, 4px); color: #15151d; }
.scd-fan__c[data-i="1"] { transform: rotate(0deg)   translateY(-8px);     color: #d4163b; z-index: 12; }
.scd-fan__c[data-i="2"] { transform: rotate(14deg)  translate(50px, 4px); color: #d4a017; }
<div class="scd-fan scd-cycle" tabindex="0">
  <div class="scd-fan__c" data-i="0" style="--i:0">A♠</div>
  <div class="scd-fan__c" data-i="1" style="--i:1">K♥</div>
  <div class="scd-fan__c" data-i="2" style="--i:2">Q♦</div>
</div>
/* Click-to-cycle the fan: rotate cards through positions.
   Updates both CSS custom property --i (drives z-index)
   and data-i attribute (drives the transform + color rules). */
document.querySelectorAll('.scd-fan.scd-cycle').forEach(function(stack) {
  stack.addEventListener('click', function() {
    var cards = Array.from(stack.children);
    var max = cards.length - 1;
    cards.forEach(function(card) {
      var current = parseInt(card.dataset.i || '0', 10);
      var next = current === 0 ? max : current - 1;
      card.dataset.i = next;
      card.style.setProperty('--i', next);
    });
  });
});
03 / 22
Tilted Polaroids
CSS + JS
Sunset · '98
Coast · '03
Forest · '09
Polaroid photos with white frames stacked at casual angles — click to cycle the front polaroid to the back of the pile.
.scd-tilt {
  position: relative; width: 240px; height: 180px; margin: 0 auto;
  display: flex; justify-content: center; align-items: center;
  cursor: pointer;
}
.scd-tilt__c {
  position: absolute;
  width: 110px; padding: 8px 8px 24px;
  background: #faf6e8;
  border-radius: 3px;
  box-shadow: 0 8px 18px -6px rgba(0,0,0,0.45), 0 0 0 1px rgba(0,0,0,0.04);
  display: flex; flex-direction: column; gap: 8px;
  transform: translate(calc((var(--i) - 1) * 18px), calc(var(--i) * 6px)) rotate(calc((var(--i) - 1) * 9deg));
  z-index: calc(10 - var(--i));
  transition: transform .5s cubic-bezier(.3,1.2,.4,1), z-index 0s .25s;
}
.scd-tilt__photo {
  width: 100%; height: 96px; border-radius: 1px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}
.scd-tilt__c span {
  font: 600 10px ui-monospace, monospace;
  color: #6b5b3e; text-align: center; letter-spacing: 0.04em;
}
<div class="scd-tilt scd-cycle" tabindex="0">
  <div class="scd-tilt__c" style="--i:0"><div class="scd-tilt__photo" style="background:linear-gradient(135deg,#fb923c,#dc2626)"></div><span>Sunset · '98</span></div>
  <div class="scd-tilt__c" style="--i:1"><div class="scd-tilt__photo" style="background:linear-gradient(135deg,#0ea5e9,#1e40af)"></div><span>Coast · '03</span></div>
  <div class="scd-tilt__c" style="--i:2"><div class="scd-tilt__photo" style="background:linear-gradient(135deg,#84cc16,#365314)"></div><span>Forest · '09</span></div>
</div>
/* Click-to-cycle the polaroid pile: send the front photo to the back. */
document.querySelectorAll('.scd-tilt.scd-cycle').forEach(function(stack) {
  stack.addEventListener('click', function() {
    var cards = Array.from(stack.children);
    var max = cards.length - 1;
    cards.forEach(function(card) {
      var current = parseInt(card.style.getPropertyValue('--i') || '0', 10);
      var next = current === 0 ? max : current - 1;
      card.style.setProperty('--i', next);
    });
  });
});
04 / 22
Staircase Bricks
CSS + JS
Q1 · Plan
Q2 · Build
Q3 · Ship
Q4 · Scale
Cards stacked diagonally like ascending stairs — click to shuffle the bottom brick to the top and watch the staircase rebuild.
.scd-brick {
  position: relative; width: 240px; height: 180px; margin: 0 auto;
  cursor: pointer;
}
.scd-brick__c {
  position: absolute;
  width: 130px; height: 38px;
  background: linear-gradient(135deg, #fb923c, #f97316);
  color: #fff;
  border-radius: 8px;
  display: grid; place-items: center;
  font: 700 12px ui-monospace, monospace;
  box-shadow: 0 6px 12px -3px rgba(249,115,22,0.45), inset 0 1px 0 rgba(255,255,255,0.2);
  bottom: calc(var(--i) * 32px);
  left: calc(var(--i) * 26px);
  z-index: var(--i);
  transition: bottom .5s cubic-bezier(.3,1.2,.4,1), left .5s cubic-bezier(.3,1.2,.4,1);
}
<div class="scd-brick scd-cycle" tabindex="0">
  <div class="scd-brick__c" style="--i:0">Q1 · Plan</div>
  <div class="scd-brick__c" style="--i:1">Q2 · Build</div>
  <div class="scd-brick__c" style="--i:2">Q3 · Ship</div>
  <div class="scd-brick__c" style="--i:3">Q4 · Scale</div>
</div>
/* Click-to-cycle the staircase: shuffle the bottom brick to the top
   and the rest shift one step down. */
document.querySelectorAll('.scd-brick.scd-cycle').forEach(function(stack) {
  stack.addEventListener('click', function() {
    var cards = Array.from(stack.children);
    var max = cards.length - 1;
    cards.forEach(function(card) {
      var current = parseInt(card.style.getPropertyValue('--i') || '0', 10);
      var next = current === 0 ? max : current - 1;
      card.style.setProperty('--i', next);
    });
  });
});
05 / 22
Perspective Deck
CSS + JS
15
14
13
12
A deck-of-cards stack with strong 3D perspective — click to send the front card receding into the back of the deck.
.scd-persp {
  position: relative; width: 220px; height: 160px; margin: 0 auto;
  perspective: 600px; transform-style: preserve-3d;
  cursor: pointer;
}
.scd-persp__c {
  position: absolute; left: 50%; top: 50%;
  width: 140px; height: 90px; margin: -45px 0 0 -70px;
  background: linear-gradient(160deg, #0ea5e9, #06b6d4);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  color: #fff;
  display: grid; place-items: center;
  font: 800 26px ui-monospace, monospace;
  box-shadow: 0 8px 20px -8px rgba(14,165,233,0.5);
  transform: translateZ(calc(var(--i) * -22px)) translateY(calc(var(--i) * -8px));
  filter: brightness(calc(1 - var(--i) * 0.12));
  z-index: calc(10 - var(--i));
  transition: transform .55s cubic-bezier(.3,1.2,.4,1), filter .4s, z-index 0s .27s;
}
<div class="scd-persp scd-cycle" tabindex="0">
  <div class="scd-persp__c" style="--i:3">15</div>
  <div class="scd-persp__c" style="--i:2">14</div>
  <div class="scd-persp__c" style="--i:1">13</div>
  <div class="scd-persp__c" style="--i:0">12</div>
</div>
/* Click-to-cycle the perspective deck: front card recedes into the back. */
document.querySelectorAll('.scd-persp.scd-cycle').forEach(function(stack) {
  stack.addEventListener('click', function() {
    var cards = Array.from(stack.children);
    var max = cards.length - 1;
    cards.forEach(function(card) {
      var current = parseInt(card.style.getPropertyValue('--i') || '0', 10);
      var next = current === 0 ? max : current - 1;
      card.style.setProperty('--i', next);
    });
  });
});
06 / 22
Hover Spread
Pure CSS
Cards stacked tight at the center; on hover they fan outward into a horizontal row.
.scd-spread {
  position: relative;
  width: 320px; height: 130px; margin: 0 auto;
  cursor: pointer;
}
.scd-spread__c {
  position: absolute;
  left: 50%; top: 50%;
  width: 56px; height: 78px; margin: -39px 0 0 -28px;
  background: linear-gradient(160deg, #ec4899, #db2777);
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  color: #fff; font-size: 22px;
  display: grid; place-items: center;
  box-shadow: 0 6px 16px -4px rgba(219,39,119,0.55);
  transform: translateX(calc((var(--i) - 2) * 6px)) translateY(calc(var(--i) * -2px)) rotate(calc((var(--i) - 2) * 4deg));
  transition: transform .5s cubic-bezier(.3,1.3,.5,1);
  z-index: calc(10 - var(--i));
}
.scd-spread:hover .scd-spread__c {
  transform: translateX(calc((var(--i) - 2) * 60px)) translateY(0) rotate(0);
}
<div class="scd-spread">
  <div class="scd-spread__c" style="--i:0">⚡</div>
  <div class="scd-spread__c" style="--i:1">★</div>
  <div class="scd-spread__c" style="--i:2">♥</div>
  <div class="scd-spread__c" style="--i:3">⌘</div>
  <div class="scd-spread__c" style="--i:4">◐</div>
</div>
07 / 22
Cascade Lift
Pure CSS
Mon3 events
Tue1 event
Wed5 events
Thu2 events
Cards stacked vertically; on hover they slide upward in a staggered cascade.
.scd-casc { position: relative; width: 220px; height: 170px; margin: 0 auto; cursor: pointer; }
.scd-casc__c {
  position: absolute; left: 50%; bottom: 0;
  width: 180px; height: 56px; margin-left: -90px;
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  border-radius: 10px; padding: 10px 16px;
  color: #fff;
  display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 4px 12px -2px rgba(20,184,166,0.5);
  transform: translateY(calc(var(--i) * -8px)) scale(calc(1 - var(--i) * 0.04));
  transition: transform .4s cubic-bezier(.3,1.3,.5,1);
  z-index: calc(10 - var(--i));
}
.scd-casc:hover .scd-casc__c {
  transform: translateY(calc(var(--i) * -56px)) scale(1);
}
.scd-casc__c b    { font: 700 13px/1 system-ui; }
.scd-casc__c span { font: 11px/1 system-ui; opacity: 0.78; }
<div class="scd-casc">
  <div class="scd-casc__c" style="--i:0"><b>Mon</b><span>3 events</span></div>
  <div class="scd-casc__c" style="--i:1"><b>Tue</b><span>1 event</span></div>
  <div class="scd-casc__c" style="--i:2"><b>Wed</b><span>5 events</span></div>
  <div class="scd-casc__c" style="--i:3"><b>Thu</b><span>2 events</span></div>
</div>
08 / 22
Peel Back
Pure CSS

Surprise!

Lift the corner to reveal.

Hover me
Top card peels back from the corner on hover, revealing the card beneath.
.scd-peel { position: relative; width: 200px; height: 140px; margin: 0 auto; perspective: 1000px; cursor: pointer; }
.scd-peel__back, .scd-peel__front {
  position: absolute; inset: 0;
  border-radius: 14px;
  display: grid; place-items: center;
  text-align: center;
}
.scd-peel__back {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff; padding: 20px;
}
.scd-peel__back h4 { margin: 0 0 6px; font: 800 16px/1 system-ui; }
.scd-peel__back p  { margin: 0; font: 11px/1.4 system-ui; opacity: 0.85; }
.scd-peel__front {
  background: #1e293b; color: #cbd5e1;
  font: 600 14px system-ui;
  transform-origin: top right;
  transition: transform .5s cubic-bezier(.3,1,.3,1);
  box-shadow: 0 8px 22px -8px rgba(0,0,0,0.5);
}
.scd-peel:hover .scd-peel__front {
  transform: rotate3d(-1, 1, 0, 75deg);
}
<div class="scd-peel">
  <div class="scd-peel__back">
    <h4>Surprise!</h4>
    <p>Lift the corner to reveal.</p>
  </div>
  <div class="scd-peel__front">Hover me</div>
</div>
09 / 22
Accordion Spread
Pure CSS
Music
Video
Photo
Notes
Tightly compressed cards expand into a horizontal accordion on hover, each card visible.
.scd-acc {
  display: flex; gap: 2px;
  width: 240px; height: 140px; margin: 0 auto;
  border-radius: 12px; overflow: hidden;
  cursor: pointer;
}
.scd-acc__c {
  flex: 1;
  background: var(--c);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font: 700 12px/1 system-ui;
  letter-spacing: 0.1em; text-transform: uppercase;
  writing-mode: vertical-rl; transform: rotate(180deg);
  transition: flex .45s cubic-bezier(.3,1,.3,1);
}
.scd-acc__c:hover {
  flex: 4; writing-mode: horizontal-tb; transform: none;
}
<div class="scd-acc">
  <div class="scd-acc__c" style="--c:#a855f7">Music</div>
  <div class="scd-acc__c" style="--c:#3b82f6">Video</div>
  <div class="scd-acc__c" style="--c:#10b981">Photo</div>
  <div class="scd-acc__c" style="--c:#f59e0b">Notes</div>
</div>
10 / 22
Shuffle Reveal
Pure CSS
3
2
1
On hover the top card slides away while the cards beneath rise into view — a clean deck shuffle.
.scd-shuf { position: relative; width: 220px; height: 150px; margin: 0 auto; cursor: pointer; }
.scd-shuf__c {
  position: absolute; left: 50%; top: 50%;
  width: 130px; height: 110px; margin: -55px 0 0 -65px;
  background: var(--bg);
  border-radius: 14px;
  color: #fff;
  display: grid; place-items: center;
  font: 800 32px ui-monospace, monospace;
  box-shadow: 0 8px 22px -10px rgba(0,0,0,0.5);
  transform: translateY(calc(var(--i) * -8px)) scale(calc(1 - var(--i) * 0.06));
  transition: transform .5s cubic-bezier(.3,1.4,.4,1);
  z-index: calc(10 - var(--i));
}
.scd-shuf:hover .scd-shuf__c { transform: translateY(calc((var(--i) - 1) * -8px)) scale(calc(1 - (var(--i) - 1) * 0.06)); }
.scd-shuf:hover .scd-shuf__c[style*="--i:0"] { transform: translate(140%, -10px) rotate(16deg); }
<div class="scd-shuf">
  <div class="scd-shuf__c" style="--i:2; --bg:linear-gradient(135deg,#3730a3,#1e1b4b)">3</div>
  <div class="scd-shuf__c" style="--i:1; --bg:linear-gradient(135deg,#5b21b6,#3b0764)">2</div>
  <div class="scd-shuf__c" style="--i:0; --bg:linear-gradient(135deg,#a855f7,#7c3aed)">1</div>
</div>
11 / 22
Tab Stack
Pure CSS
Radio-driven tab stack — click any card to bring it to the front of the deck.
.scd-tab { position: relative; width: 220px; height: 150px; margin: 0 auto; }
.scd-tab > input { display: none; }
.scd-tab__c {
  position: absolute; left: 50%; top: 50%;
  width: 200px; height: 110px; margin: -55px 0 0 -100px;
  background: linear-gradient(135deg, #1e3a8a, #1e40af);
  color: #fff;
  border-radius: 12px; padding: 14px 18px;
  cursor: pointer;
  box-shadow: 0 6px 18px -6px rgba(30,58,138,0.55);
  transition: transform .4s cubic-bezier(.3,1.3,.5,1);
}
.scd-tab__c[data-i="0"] { transform: translateY(0)    scale(1);    z-index: 3; }
.scd-tab__c[data-i="1"] { transform: translateY(-10px) scale(0.94); z-index: 2; }
.scd-tab__c[data-i="2"] { transform: translateY(-20px) scale(0.88); z-index: 1; }
#scd-tab-1:checked ~ [data-i="0"] { transform: translateY(0) scale(1); z-index: 3; }
#scd-tab-2:checked ~ [data-i="1"] { transform: translateY(0) scale(1); z-index: 3; }
#scd-tab-2:checked ~ [data-i="0"] { transform: translateY(20px) scale(0.88); z-index: 1; }
#scd-tab-3:checked ~ [data-i="2"] { transform: translateY(0) scale(1); z-index: 3; }
#scd-tab-3:checked ~ [data-i="1"] { transform: translateY(20px) scale(0.88); z-index: 1; }
#scd-tab-3:checked ~ [data-i="0"] { transform: translateY(40px) scale(0.78); z-index: 0; opacity: 0.5; }
.scd-tab__c h4 { margin: 0 0 4px; font: 700 13px/1 system-ui; }
.scd-tab__c p  { margin: 0; font: 11px/1.5 system-ui; opacity: 0.78; }
<div class="scd-tab">
  <input type="radio" name="scd-tab" id="scd-tab-1" checked>
  <input type="radio" name="scd-tab" id="scd-tab-2">
  <input type="radio" name="scd-tab" id="scd-tab-3">
  <label for="scd-tab-1" class="scd-tab__c" data-i="0"><h4>Overview</h4><p>Quick summary of the project status.</p></label>
  <label for="scd-tab-2" class="scd-tab__c" data-i="1"><h4>Activity</h4><p>Recent edits and team mentions.</p></label>
  <label for="scd-tab-3" class="scd-tab__c" data-i="2"><h4>Settings</h4><p>Permissions, integrations, billing.</p></label>
</div>
12 / 22
Photos Pinch
Pure CSS
iOS Photos-style stack — click to pull the selected photo forward, others compress behind.
.scd-photo { position: relative; width: 240px; height: 160px; margin: 0 auto; }
.scd-photo > input { display: none; }
.scd-photo__c {
  position: absolute; left: 50%; top: 50%;
  width: 100px; height: 130px; margin: -65px 0 0 -50px;
  background: var(--bg);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 8px 20px -6px rgba(0,0,0,0.4), inset 0 0 0 2px rgba(255,255,255,0.15);
  transition: transform .45s cubic-bezier(.3,1,.3,1);
  z-index: calc(10 - var(--i));
}
.scd-photo__c[data-i="0"] { transform: translateX(-72px) translateY(8px) rotate(-12deg); }
.scd-photo__c[data-i="1"] { transform: translateX(-24px) translateY(-4px) rotate(-4deg); }
.scd-photo__c[data-i="2"] { transform: translateX(24px) translateY(-4px) rotate(4deg); }
.scd-photo__c[data-i="3"] { transform: translateX(72px) translateY(8px) rotate(12deg); }
#scd-photo-1:checked ~ [data-i="0"],
#scd-photo-2:checked ~ [data-i="1"],
#scd-photo-3:checked ~ [data-i="2"],
#scd-photo-4:checked ~ [data-i="3"] {
  transform: translate(0, 0) rotate(0) scale(1.08);
  z-index: 20;
  box-shadow: 0 16px 36px -10px rgba(0,0,0,0.55), inset 0 0 0 2px rgba(255,255,255,0.3);
}
<div class="scd-photo">
  <input type="radio" name="scd-photo" id="scd-photo-1" checked>
  <input type="radio" name="scd-photo" id="scd-photo-2">
  <input type="radio" name="scd-photo" id="scd-photo-3">
  <input type="radio" name="scd-photo" id="scd-photo-4">
  <label for="scd-photo-1" class="scd-photo__c" data-i="0" style="--bg:#0ea5e9"></label>
  <label for="scd-photo-2" class="scd-photo__c" data-i="1" style="--bg:#f43f5e"></label>
  <label for="scd-photo-3" class="scd-photo__c" data-i="2" style="--bg:#22c55e"></label>
  <label for="scd-photo-4" class="scd-photo__c" data-i="3" style="--bg:#a855f7"></label>
</div>
13 / 22
Swipe Stack
CSS + JS

Card 3

The last one.

Tinder-style stack — click the top card to swipe it away. A small JS helper resets the deck every couple of seconds so the demo loops.
.scd-swipe { position: relative; width: 200px; height: 150px; margin: 0 auto; }
.scd-swipe > input { display: none; }
.scd-swipe__c {
  position: absolute; left: 50%; top: 50%;
  width: 170px; height: 120px; margin: -60px 0 0 -85px;
  background: linear-gradient(160deg, #be185d, #831843);
  color: #fff;
  border-radius: 14px; padding: 16px 20px;
  cursor: pointer;
  box-shadow: 0 8px 22px -8px rgba(190,24,93,0.55);
  transform: translateY(calc(var(--i) * -10px)) scale(calc(1 - var(--i) * 0.05));
  transition: transform .5s cubic-bezier(.3,1,.3,1), opacity .4s;
  z-index: calc(10 - var(--i));
}
.scd-swipe__c h4 { margin: 0 0 6px; font: 700 14px/1 system-ui; }
.scd-swipe__c p  { margin: 0; font: 11px/1.5 system-ui; opacity: 0.85; }
#scd-swipe-1:checked ~ [data-card="1"] { transform: translate(180%, -30px) rotate(20deg); opacity: 0; }
#scd-swipe-2:checked ~ [data-card="2"] { transform: translate(-180%, -30px) rotate(-20deg); opacity: 0; }
<div class="scd-swipe">
  <input type="checkbox" id="scd-swipe-1">
  <input type="checkbox" id="scd-swipe-2">
  <div class="scd-swipe__c" style="--i:2"><h4>Card 3</h4><p>The last one.</p></div>
  <label for="scd-swipe-2" class="scd-swipe__c" data-card="2" style="--i:1"><h4>Card 2</h4><p>Click to dismiss.</p></label>
  <label for="scd-swipe-1" class="scd-swipe__c" data-card="1" style="--i:0"><h4>Card 1</h4><p>Click to dismiss.</p></label>
</div>
/* Auto-reset the swipe stack 1.5s after a card is dismissed,
   so the demo loops continuously for the next visitor. */
document.querySelectorAll('.scd-swipe').forEach(function(stack) {
  var inputs = stack.querySelectorAll('input[type="checkbox"]');
  inputs.forEach(function(input) {
    input.addEventListener('change', function() {
      if (input.checked) {
        setTimeout(function() { input.checked = false; }, 1500);
      }
    });
  });
});
14 / 22
Accordion Card
Pure CSS
Vertically-stacked cards expand on click via :checked, each revealing more body content.
.scd-accc {
  display: flex; flex-direction: column; gap: 4px;
  width: 240px; margin: 0 auto;
}
.scd-accc > input { display: none; }
.scd-accc__c {
  background: linear-gradient(135deg, #4c1d95, #6d28d9);
  color: #fff;
  border-radius: 10px; padding: 12px 16px;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 4px;
  height: 24px; overflow: hidden;
  transition: height .35s cubic-bezier(.3,1.3,.5,1), background .25s;
}
.scd-accc__c b    { font: 700 13px/1 system-ui; }
.scd-accc__c span { font: 11px/1 system-ui; opacity: 0.78; }
#scd-accc-1:checked ~ .scd-accc__c:nth-of-type(1),
#scd-accc-2:checked ~ .scd-accc__c:nth-of-type(2),
#scd-accc-3:checked ~ .scd-accc__c:nth-of-type(3) {
  height: 64px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}
<div class="scd-accc">
  <input type="radio" name="scd-accc" id="scd-accc-1" checked>
  <input type="radio" name="scd-accc" id="scd-accc-2">
  <input type="radio" name="scd-accc" id="scd-accc-3">
  <label for="scd-accc-1" class="scd-accc__c"><b>Episode 1</b><span>The Beginning · 24 min</span></label>
  <label for="scd-accc-2" class="scd-accc__c"><b>Episode 2</b><span>The Twist · 31 min</span></label>
  <label for="scd-accc-3" class="scd-accc__c"><b>Episode 3</b><span>The Reveal · 28 min</span></label>
</div>
15 / 22
Timeline Stack
Pure CSS
Founded
Series A
10k Users
Vertical timeline of cards stacked top-down, each tied to a milestone date marker.
.scd-tl {
  position: relative; width: 230px; padding-left: 24px;
  margin: 0 auto;
}
.scd-tl::before {
  content: ''; position: absolute; left: 8px; top: 12px; bottom: 12px;
  width: 2px; background: linear-gradient(180deg, #f97316, #ea580c);
  border-radius: 2px;
}
.scd-tl__c {
  position: relative;
  background: linear-gradient(135deg, #fed7aa, #fdba74);
  color: #7c2d12;
  padding: 10px 14px; margin-bottom: 8px;
  border-radius: 10px;
  display: flex; gap: 12px; align-items: center;
  box-shadow: 0 4px 10px -2px rgba(249,115,22,0.4);
  transform: translateX(calc(var(--i) * 4px));
}
.scd-tl__c::before {
  content: ''; position: absolute; left: -22px; top: 50%;
  width: 12px; height: 12px; border-radius: 50%;
  background: #f97316; transform: translateY(-50%);
  box-shadow: 0 0 0 3px #fb923c33;
}
.scd-tl__c time { font: 700 12px ui-monospace, monospace; opacity: 0.7; }
.scd-tl__c b    { font: 700 13px system-ui; }
<div class="scd-tl">
  <div class="scd-tl__c" style="--i:0"><time>2024</time><b>Founded</b></div>
  <div class="scd-tl__c" style="--i:1"><time>2025</time><b>Series A</b></div>
  <div class="scd-tl__c" style="--i:2"><time>2026</time><b>10k Users</b></div>
</div>
16 / 22
Isometric Tower
Pure CSS
UI
Logic
Data
Cache
Cards stacked vertically with a strong isometric tilt — looks like a 3D building of layers.
.scd-iso {
  position: relative; width: 200px; height: 170px; margin: 0 auto;
  transform: rotateX(55deg) rotateZ(-30deg); transform-style: preserve-3d;
  margin-top: 6px;
}
.scd-iso__c {
  position: absolute; left: 50%; top: 50%;
  width: 130px; height: 26px; margin: -13px 0 0 -65px;
  background: var(--c);
  color: #fff;
  display: grid; place-items: center;
  font: 700 11px ui-monospace, monospace;
  letter-spacing: 0.14em; text-transform: uppercase;
  border-radius: 4px;
  box-shadow: 0 4px 0 rgba(0,0,0,0.25);
  transform: translateZ(calc(var(--i) * 26px));
}
<div class="scd-iso">
  <div class="scd-iso__c" style="--i:0; --c:#06b6d4">UI</div>
  <div class="scd-iso__c" style="--i:1; --c:#0891b2">Logic</div>
  <div class="scd-iso__c" style="--i:2; --c:#0e7490">Data</div>
  <div class="scd-iso__c" style="--i:3; --c:#155e75">Cache</div>
</div>
17 / 22
3D Flip Stack
Pure CSS
Front A
Back A
Front B
Back B
Front C
Back C
Cards rotate around their own axis on hover — each flips 180° revealing its back face.
.scd-flip {
  position: relative; width: 240px; height: 130px; margin: 0 auto;
  display: flex; gap: 8px; perspective: 800px;
}
.scd-flip__c {
  flex: 1; position: relative;
  transform-style: preserve-3d;
  transition: transform .55s cubic-bezier(.3,1,.3,1);
  transition-delay: calc(var(--i) * 0.08s);
}
.scd-flip__f, .scd-flip__b {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  border-radius: 10px;
  font: 700 12px system-ui;
  backface-visibility: hidden;
}
.scd-flip__f { background: linear-gradient(135deg, #84cc16, #65a30d); color: #1a2e05; }
.scd-flip__b { background: linear-gradient(135deg, #1a2e05, #365314); color: #d9f99d; transform: rotateY(180deg); }
.scd-flip:hover .scd-flip__c { transform: rotateY(180deg); }
<div class="scd-flip">
  <div class="scd-flip__c" style="--i:0"><div class="scd-flip__f">Front A</div><div class="scd-flip__b">Back A</div></div>
  <div class="scd-flip__c" style="--i:1"><div class="scd-flip__f">Front B</div><div class="scd-flip__b">Back B</div></div>
  <div class="scd-flip__c" style="--i:2"><div class="scd-flip__f">Front C</div><div class="scd-flip__b">Back C</div></div>
</div>
18 / 22
Spiral Tower
Pure CSS
A
B
C
D
E
Cards arranged in a vertical spiral, each rotated incrementally around a Y axis.
.scd-spir {
  position: relative; width: 200px; height: 180px; margin: 0 auto;
  perspective: 800px; transform-style: preserve-3d;
}
.scd-spir__c {
  position: absolute; left: 50%; top: 50%;
  width: 80px; height: 50px; margin: -25px 0 0 -40px;
  background: linear-gradient(135deg, #db2777, #be185d);
  color: #fff;
  display: grid; place-items: center;
  font: 800 18px ui-monospace, monospace;
  border-radius: 8px;
  box-shadow: 0 4px 12px -4px rgba(190,24,93,0.5);
  transform:
    translateY(calc(var(--i) * -16px))
    rotateY(calc(var(--i) * 30deg))
    translateZ(40px);
}
<div class="scd-spir">
  <div class="scd-spir__c" style="--i:0">A</div>
  <div class="scd-spir__c" style="--i:1">B</div>
  <div class="scd-spir__c" style="--i:2">C</div>
  <div class="scd-spir__c" style="--i:3">D</div>
  <div class="scd-spir__c" style="--i:4">E</div>
</div>
19 / 22
Tilt on Hover
Pure CSS
Cover
Page 2
Page 3
Stack tilts in 3D following the global hover state — gentle parallax with depth.
.scd-pers {
  position: relative; width: 200px; height: 140px; margin: 0 auto;
  perspective: 1000px; transform-style: preserve-3d;
}
.scd-pers__c {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #fff;
  border-radius: 12px;
  display: grid; place-items: center;
  font: 700 16px system-ui;
  box-shadow: 0 8px 22px -8px rgba(244,63,94,0.55);
  transform: translateZ(calc(var(--i) * -30px)) translateY(calc(var(--i) * -8px));
  transition: transform .5s cubic-bezier(.3,1,.3,1);
  z-index: calc(10 - var(--i));
}
.scd-pers:hover { transform: rotateX(-12deg) rotateY(8deg); transition: transform .4s; }
<div class="scd-pers">
  <div class="scd-pers__c" style="--i:0">Cover</div>
  <div class="scd-pers__c" style="--i:1">Page 2</div>
  <div class="scd-pers__c" style="--i:2">Page 3</div>
</div>
20 / 22
Notification Pile
Pure CSS
SarahSent you a file
GitHubNew PR review
Linear3 new comments
CalendarMeeting in 5min
New notifications stack from the top, older ones shrink and fade — the Apple-Mail style.
.scd-not { position: relative; width: 220px; height: 150px; margin: 0 auto; }
.scd-not__c {
  position: absolute; left: 50%; top: 8px;
  width: 200px; margin-left: -100px;
  background: rgba(30, 30, 40, 0.92);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  color: #f1f5f9;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 10px 14px;
  display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 4px 14px -4px rgba(0,0,0,0.4);
  transform: translateY(calc(var(--i) * 8px)) scale(calc(1 - var(--i) * 0.04));
  opacity: calc(1 - var(--i) * 0.18);
  z-index: calc(10 - var(--i));
}
.scd-not__c b    { font: 700 12px/1 system-ui; }
.scd-not__c span { font: 11px/1 system-ui; opacity: 0.65; }
<div class="scd-not">
  <div class="scd-not__c" style="--i:0"><b>Sarah</b><span>Sent you a file</span></div>
  <div class="scd-not__c" style="--i:1"><b>GitHub</b><span>New PR review</span></div>
  <div class="scd-not__c" style="--i:2"><b>Linear</b><span>3 new comments</span></div>
  <div class="scd-not__c" style="--i:3"><b>Calendar</b><span>Meeting in 5min</span></div>
</div>
21 / 22
Receipt Roll
Pure CSS
ORDER · #4218 Latte · $4.50 Croissant · $3.25
ORDER · #4219 Espresso · $3.00
ORDER · #4220 Mocha · $5.25
A receipt-style stack that tears off at the perforated edge — each card a separate ticket.
.scd-rcpt {
  width: 180px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 0;
  font: 11px/1.4 ui-monospace, monospace;
}
.scd-rcpt__c {
  background: #fafaf9; color: #292524;
  padding: 10px 16px;
  display: flex; flex-direction: column; gap: 2px;
  position: relative;
  border-bottom: 1px dashed #a8a29e;
}
.scd-rcpt__c::before, .scd-rcpt__c::after {
  content: ''; position: absolute; bottom: -6px;
  width: 12px; height: 12px;
  background: #17171f;
  border-radius: 50%;
}
.scd-rcpt__c::before { left: -6px; }
.scd-rcpt__c::after  { right: -6px; }
.scd-rcpt__c:last-child { border-bottom: none; }
.scd-rcpt__c:last-child::before, .scd-rcpt__c:last-child::after { display: none; }
.scd-rcpt__c b { font: 700 12px/1.2 ui-monospace; letter-spacing: 0.06em; }
<div class="scd-rcpt">
  <div class="scd-rcpt__c">
    <b>ORDER · #4218</b>
    <span>Latte · $4.50</span>
    <span>Croissant · $3.25</span>
  </div>
  <div class="scd-rcpt__c">
    <b>ORDER · #4219</b>
    <span>Espresso · $3.00</span>
  </div>
  <div class="scd-rcpt__c">
    <b>ORDER · #4220</b>
    <span>Mocha · $5.25</span>
  </div>
</div>
22 / 22
Scratch Cards
Pure CSS
$50
$100
$25
Lottery-style scratch cards stacked at angles. Hover reveals the prize beneath each foil.
.scd-scr {
  position: relative; width: 240px; height: 140px; margin: 0 auto;
  display: flex; justify-content: center; align-items: center; gap: -20px;
}
.scd-scr__c {
  position: relative;
  width: 80px; height: 110px; margin: 0 -8px;
  background: #fef3c7;
  border-radius: 8px;
  transform: rotate(var(--r));
  display: grid; place-items: center;
  box-shadow: 0 6px 14px -4px rgba(0,0,0,0.3);
  overflow: hidden;
  cursor: pointer;
}
.scd-scr__p {
  font: 800 22px/1 ui-monospace, monospace;
  color: #92400e;
}
.scd-scr__f {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #94a3b8, #64748b);
  background-image:
    linear-gradient(135deg, transparent 25%, rgba(255,255,255,0.4) 50%, transparent 75%),
    linear-gradient(135deg, #94a3b8, #64748b);
  transition: opacity .4s;
}
.scd-scr__c:hover .scd-scr__f { opacity: 0; }
<div class="scd-scr">
  <div class="scd-scr__c" style="--r:-8deg"><span class="scd-scr__p">$50</span><span class="scd-scr__f"></span></div>
  <div class="scd-scr__c" style="--r:0deg"><span class="scd-scr__p">$100</span><span class="scd-scr__f"></span></div>
  <div class="scd-scr__c" style="--r:8deg"><span class="scd-scr__p">$25</span><span class="scd-scr__f"></span></div>
</div>

Related collections