kitbash Sign in Connect agent
Components

Jewel card deck

Deep jewel-toned cards with two-tone lines and a tag chip; they lift and soften their corners on hover, and a shuffle button deals them again.

Part of the style

Peach Haze Prompt Deck

7 parts that belong together, with their tokens, type and rules.

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --paper: #dfe4e8;
  --paper-warm: #d9dee2;
  --card: #e6ebef;
  --ink: #030101;
  --ink-soft: #443d3d;
  --ink-faint: #655e5d;
  --ink-ghost: #9a9fa3;
  --line: rgba(3, 1, 1, 0.08);
  --chip: rgba(3, 1, 1, 0.05);
  --haze-b: #d0d6da;
  --on-dark: #cfd4d9;
  --on-dark-soft: rgba(207, 212, 217, 0.6);
  --on-dark-chip: rgba(230, 235, 239, 0.16);
  --jewel-coal: #0a0505;
  --scrim: rgba(0, 0, 0, 0.55);
  --glass: rgba(230, 235, 239, 0.18);
  --accent: #df531e;
  --accent-deep: #c34107;
  --accent-glow: rgba(223, 83, 30, 0.35);
  --haze-a: #edbdae;
  --jewel-wine: #270701;
  --tint-wine: #e47d5c;
  --jewel-forest: #df531e;
  --jewel-plum: #df531e;
  --jewel-slate: #df531e;
}
</style>

<section class="deck">
  <div class="deck__head">
    <h2 class="deck__title">Ask people who have built it.</h2>
    <button class="deck__shuffle" type="button" aria-label="Deal the cards again">
      <svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M1.5 4.5h2.6c1.6 0 2.6.8 3.5 2.2l1.4 2.4c.8 1.4 1.8 2.4 3.5 2.4h2M12.5 9.5l2 2-2 2M1.5 11.5h2.6c1 0 1.7-.3 2.3-.9M14.5 4.5h-2c-1 0-1.8.3-2.4 1M12.5 2.5l2 2-2 2" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" /></svg>
    </button>
  </div>

  <ul class="deck__grid">
    <li class="deck__item">
      <a class="deck__card deck__card--wine" href="#">
        <svg class="deck__mark" viewBox="0 0 20 20" width="14" height="14" aria-hidden="true"><path d="M3 10a7 7 0 0 1 14 0z" fill="currentColor" /><path d="M6 12.5h8a4 4 0 0 1-8 0z" fill="currentColor" opacity="0.5" /></svg>
        <span class="deck__line">Ask boatwrights about <span class="deck__line-two">the first winter afloat in a hull you built</span></span>
        <span class="deck__tag">Boats</span>
      </a>
    </li>
    <li class="deck__item">
      <a class="deck__card deck__card--coal" href="#">
        <svg class="deck__mark" viewBox="0 0 20 20" width="14" height="14" aria-hidden="true"><path d="M3 10a7 7 0 0 1 14 0z" fill="currentColor" /><path d="M6 12.5h8a4 4 0 0 1-8 0z" fill="currentColor" opacity="0.5" /></svg>
        <span class="deck__line">Ask a print shop foreman about <span class="deck__line-two">running a press room that never stops</span></span>
        <span class="deck__tag">Print</span>
      </a>
    </li>
    <li class="deck__item">
      <a class="deck__card deck__card--forest" href="#">
        <svg class="deck__mark" viewBox="0 0 20 20" width="14" height="14" aria-hidden="true"><path d="M3 10a7 7 0 0 1 14 0z" fill="currentColor" /><path d="M6 12.5h8a4 4 0 0 1-8 0z" fill="currentColor" opacity="0.5" /></svg>
        <span class="deck__line">Ask orchard keepers about <span class="deck__line-two">trees that outlive the people who plant them</span></span>
        <span class="deck__tag">Garden</span>
      </a>
    </li>
    <li class="deck__item">
      <a class="deck__card deck__card--plum" href="#">
        <svg class="deck__mark" viewBox="0 0 20 20" width="14" height="14" aria-hidden="true"><path d="M3 10a7 7 0 0 1 14 0z" fill="currentColor" /><path d="M6 12.5h8a4 4 0 0 1-8 0z" fill="currentColor" opacity="0.5" /></svg>
        <span class="deck__line">Ask potters about <span class="deck__line-two">the kiln load that taught them patience</span></span>
        <span class="deck__tag">Clay</span>
      </a>
    </li>
    <li class="deck__item">
      <a class="deck__card deck__card--slate" href="#">
        <svg class="deck__mark" viewBox="0 0 20 20" width="14" height="14" aria-hidden="true"><path d="M3 10a7 7 0 0 1 14 0z" fill="currentColor" /><path d="M6 12.5h8a4 4 0 0 1-8 0z" fill="currentColor" opacity="0.5" /></svg>
        <span class="deck__line">Ask a weaver about <span class="deck__line-two">turning a hobby loom into rent money</span></span>
        <span class="deck__tag">Textiles</span>
      </a>
    </li>
    <li class="deck__item">
      <a class="deck__card deck__card--warm" href="#">
        <svg class="deck__mark" viewBox="0 0 20 20" width="14" height="14" aria-hidden="true"><path d="M3 10a7 7 0 0 1 14 0z" fill="currentColor" /><path d="M6 12.5h8a4 4 0 0 1-8 0z" fill="currentColor" opacity="0.5" /></svg>
        <span class="deck__line">Ask night bakers about <span class="deck__line-two">keeping a starter alive for thirty years</span></span>
        <span class="deck__tag">Kitchen</span>
      </a>
    </li>
  </ul>
</section>

<style>
  .deck {
    padding: var(--space-xl) var(--edge) var(--section-space);
  }
  .deck__head,
  .deck__grid {
    max-width: var(--max);
    margin-inline: auto;
  }
  .deck__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-m);
  }
  .deck__title {
    margin: 0;
    font-size: var(--text-xl);
    font-weight: 500;
    letter-spacing: var(--track-soft);
  }
  .deck__shuffle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    transition: background-color var(--quick) var(--ease), color var(--quick) var(--ease), transform var(--slide) var(--ease-out);
  }
  .deck__shuffle:hover,
  .deck__shuffle:focus-visible {
    background: var(--chip);
    color: var(--ink);
  }
  .deck__shuffle:active {
    transform: rotate(180deg);
  }
  .deck__shuffle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  .deck__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gap);
    padding: 10px 0 0;
    list-style: none;
  }
  .deck__item {
    position: relative;
  }
  .deck__item.is-dealt {
    animation: deck-deal var(--slide) var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 70ms);
  }
  @keyframes deck-deal {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
  }

  .deck__card {
    --deck-bg: var(--jewel-coal);
    --deck-two: var(--on-dark-soft);
    --deck-ink: var(--on-dark);
    --deck-chip: var(--on-dark-chip);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-m);
    min-height: 220px;
    padding: 20px 20px 18px;
    border-radius: var(--radius-card);
    background:
      radial-gradient(120% 70% at 20% 0%, rgba(255, 255, 255, 0.09), transparent 60%),
      var(--deck-bg);
    color: var(--deck-ink);
    text-decoration: none;
    transition: transform var(--slide) var(--ease-out), border-radius var(--morph) var(--ease-out), box-shadow var(--quick) var(--ease);
  }
  /* The card behind: a blurred rim of the same colour that peeks above the top edge. */
  .deck__card::before {
    content: "";
    position: absolute;
    inset: -8px 14px auto;
    height: 40px;
    z-index: -1;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    background: var(--deck-bg);
    opacity: 0.35;
    filter: blur(5px);
    transition: transform var(--slide) var(--ease-out), opacity var(--slide) var(--ease-out);
  }
  .deck__item {
    z-index: 0;
  }
  .deck__card:hover,
  .deck__card:focus-visible {
    transform: translateY(-4px);
    border-radius: var(--radius-card-hover);
    box-shadow: 0 22px 40px -22px var(--deck-bg);
  }
  .deck__card:hover::before,
  .deck__card:focus-visible::before {
    transform: translateY(-4px);
    opacity: 0.55;
  }
  .deck__card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
  }
  .deck__card--wine { --deck-bg: var(--jewel-wine); --deck-two: var(--tint-wine); }
  .deck__card--coal { --deck-bg: var(--jewel-coal); }
  .deck__card--forest { --deck-bg: var(--jewel-forest); }
  .deck__card--plum { --deck-bg: var(--jewel-plum); }
  .deck__card--slate { --deck-bg: var(--jewel-slate); }
  .deck__card--warm {
    --deck-bg: var(--paper-warm);
    --deck-ink: var(--ink);
    --deck-two: var(--accent);
    --deck-chip: var(--chip);
  }

  .deck__mark {
    opacity: 0.8;
  }
  .deck__line {
    font-family: var(--font-display);
    font-size: var(--display-s);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: var(--track-tight);
    text-wrap: balance;
  }
  .deck__line-two {
    display: block;
    color: var(--deck-two);
  }
  .deck__tag {
    align-self: flex-start;
    margin-top: auto;
    padding: 5px 9px;
    border-radius: 6px;
    background: var(--deck-chip);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: var(--track-tag);
    text-transform: uppercase;
  }

  @media (max-width: 860px) {
    .deck__grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  @media (max-width: 560px) {
    .deck__grid {
      grid-template-columns: minmax(0, 1fr);
      gap: 18px;
    }
    .deck__card {
      min-height: 168px;
    }
  }
</style>

<script>
  (() => {
    const reduce = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
    document.querySelectorAll(".deck").forEach((deck) => {
      const grid = deck.querySelector(".deck__grid");
      const button = deck.querySelector(".deck__shuffle");
      button.addEventListener("click", () => {
        const items = [...grid.children];
        for (let i = items.length - 1; i > 0; i -= 1) {
          const j = Math.floor(Math.random() * (i + 1));
          [items[i], items[j]] = [items[j], items[i]];
        }
        items.forEach((item, i) => {
          item.classList.remove("is-dealt");
          item.style.setProperty("--i", i);
          grid.appendChild(item);
        });
        if (reduce) return;
        void grid.offsetWidth;
        items.forEach((item) => item.classList.add("is-dealt"));
      });
    });
  })();
</script>

Similar components

Triage queue window

Triage queue window

Service canvas

Service canvas

Feature cards

Feature cards

Seven-day timeline

Seven-day timeline

Stacked step sheets

Stacked step sheets

Process cards on a string

Process cards on a string

Grey card rail

Grey card rail

Particle-icon services

Particle-icon services