StealThis .dev

Museum — Artifact Card

A curatorial artifact card for collection grids, shown across six fictional works and three display sizes. Each card frames a CSS-drawn image inside a soft mat, then sets the title in italic serif above artist, date, medium, a gold catalog-number chip, and an On view or In storage status pill. Hovering or focusing a card lifts it and reveals quick actions to favorite the piece or add it to a self-guided tour, with a live tour counter and confirmation toasts throughout.

Open in Lab
html css vanilla-js
Targets: JS HTML

Code

Artifact Card

A single reusable card for a museum’s collection wall, presented as a gallery of six fictional works — a Vandermeer oil, a Goryeo celadon vessel, a Réquard light study, a Salviati engraved map, an Aubin bronze, and a Cole garden scene. Every artwork is drawn entirely in CSS as a framed, matted block, so the component is fully self-contained with no external images. Each card pairs an italic serif title with the artist and date, the medium and dimensions, a gold catalog-number chip, and a status pill that reads On view with a gallery number or In storage.

The cards lift on hover and on keyboard focus, revealing two quick actions tucked into the mat: a heart to favorite the work and a plus to add it to a self-guided tour. Actions toggle their pressed state, the tour count updates live in the masthead meter, and a small toast confirms each change. Focused cards also respond to Enter or Space to drop the piece straight onto the tour.

A segmented control switches the whole grid between three sizes — Medium, Large, and Compact — which retile the cards and adjust the artwork aspect ratio and typographic scale. The layout uses generous wall space, collapses to a single column at narrow widths, keeps quick actions visible on touch, and respects reduced-motion and visible-focus preferences for accessible, keyboard-friendly use.

Illustrative UI only — demo data; not a real museum system.