skip to content
mpkcn

~/components/case-card

Case Card

A project case study card: name, one-liner, tags, links and a screenshot beside a spec-sheet list of features.

01

Atlas

Offline map viewer · 2026

Streams vector tiles, caches them in the browser and keeps working on a plane.

Designed and built it solo: tile cache, search and the share links.

  • Next.js
  • MapLibre
  • IndexedDB
  • Workers
Atlas map view
Tiles
vector, z0–14
Cache
IndexedDB, 50 MB
Search
local, fuzzy
First load
< 1 s on 4G
Bundle
92 kB gz

Installation

terminal
npx mpkcn add case-card
deps:none beyond react· tested with react@19.3.0

Usage

One card per project. Stack several in a list; each one draws a hairline above and below, so neighbours share a line.

tsx
import { CaseCard } from "@/components/mpkcn/case-card";

export function Work() {
  return (
    <CaseCard
      index="01"
      title="Atlas"
      subtitle="Offline map viewer · 2026"
      description="Streams vector tiles and keeps working on a plane."
      tags={["Next.js", "MapLibre"]}
      links={[{ label: "code", href: "https://github.com/you/atlas", ariaLabel: "Atlas source code" }]}
      image={{ src: "/shots/atlas.png", alt: "Atlas map view" }}
      features={[
        { label: "Cache", value: "IndexedDB" },
        { label: "Bundle", value: "92 kB gz" },
      ]}
    />
  );
}

With features, the card splits into two columns once it is 768px wide (a container query, so it also stacks inside a narrow layout). Without them it stays one column.

Examples

Text only

Leave out image and features for a short entry. A missing or broken image.src shows a striped "screenshot coming soon" placeholder instead.

01

Atlas

Offline map viewer · 2026

Streams vector tiles, caches them in the browser and keeps working on a plane.

  • Next.js
  • MapLibre

Placeholder

02

Relay

Webhook relay · 2025

Streams vector tiles, caches them in the browser and keeps working on a plane.

  • Next.js
  • MapLibre

Props

PropTypeDefaultDescription
titleReactNode—Project name, shown large.
indexstring—Small number or tag above the title.
subtitleReactNode—Mono line under the title.
descriptionReactNode—A sentence or two about the project.
roleReactNode—What you did on it, as a second paragraph.
tagsstring[][]Tech or topic tags.
links{ label; href; ariaLabel? }[][]Buttons under the tags; http(s) links open in a new tab.
image{ src?; alt }—Screenshot; a missing or broken src shows a placeholder.
mediaReactNode—Your own media in place of image.
features{ label; value }[]—Spec rows in the second column.
headingLevel2 | 3 | 43Heading level of the title.
classNamestring—Extra classes for the card.

Accessibility

  • Each card is an <article> with a real heading; pick headingLevel to fit your page outline.
  • Tags are a list labelled "Tags", and features a description list, so each label is tied to its value.
  • Give links an ariaLabel like "Atlas source code" when several cards share the same "code" label. External links also say "(opens in a new tab)".
  • The placeholder is an image named by image.alt. Nothing in the card moves, so there is no motion to reduce.