Skip to main content

Design system components

EnhancedProjectCard

Portfolio project card with image or video media and metadata; video is a paused preview unless autoPlayVideo loops it while on screen.

Status: stable. Group: marketing. Markdown version: /design-system/components/enhanced-project-card.md

When to use

Work-index project card with image or video preview and metadata. Video stays paused unless autoPlayVideo is set; then it loops muted while on screen and never for visitors who prefer reduced motion. The richer sibling of ProjectCard; use one per index, not both.

When not to use

  • Do not render both EnhancedProjectCard and ProjectCard in the same index; pick one per grid.
  • Do not rely on the thumbnail to carry meaning; it always renders with an empty alt, so the title and description must say what the project is.

Look-alikes

The contract names no look-alike with a deciding condition.

Props

EnhancedProjectCard props
PropTypeDefaultDescriptionRequired
titlestringnoneProject title.Yes
slugstringnoneURL slug for project detail page.Yes
thumbnailstringnoneThumbnail image URL.Yes
videoThumbnailstring | string[]noneVideo thumbnail: one URL, or several in preference order (for example WebM then MP4). thumbnail is its poster. Paused unless autoPlayVideo.No
descriptionstringnoneShort description.No
categorystringnoneProject category.No
tagsstring[]noneProject tags; only the first three render.No
aspectRatio"video" | "square" | "portrait" | "landscape"videoImage aspect ratio.No
showCategorybooleantrueShow category in caption. Defaults to true.No
showDescriptionbooleantrueShow description on hover. Defaults to true; when false the description is screen-reader-only and becomes the link's accessible description.No
autoPlayVideobooleanfalseLoop the video like a GIF: muted, inline, playing only while on screen, and never for visitors who prefer reduced motion (they see the poster). Keep such clips short.No
comingSoonbooleanfalseRender as a non-interactive teaser with a "coming soon" badge over the media.No
comingSoonLabelstringnoneVisible badge label for the coming-soon overlay. Defaults to the translated "Coming soon" (workComingSoon).No
contentLanguagestringnoneBCP 47 language tag for project-authored title and metadata.No
coverGlowbooleanfalseGlow the cover in its own colours on hover. Off by default; the work index opts in, other surfaces (home, related work) stay quiet. Default false.No
prioritybooleanfalseLoad the image thumbnail eagerly and preload it (next/image priority). Set it only on cards in the first visible row, where the cover is the page's largest paint; everywhere else the default lazy load is right. Default false.No
classNamestringnoneCustom className.No

Variants

  • Available aspect ratios: video, square, portrait, landscape (default video).

Invalid combinations

The contract records no invalid combinations.

Keyboard

EnhancedProjectCard keyboard behaviour
KeyBehaviour
GeneralUnless comingSoon is set, the whole card is a single link (<a> via next/link); Tab focuses it, Enter activates it. With comingSoon the root is a non-interactive <div> and takes no focus.
GeneralHover-only metadata affordances also fire on :focus-visible so keyboard users get parity.

Rules

Every item under When not to use is a MUST NOT. MUST and SHOULD follow RFC 2119.

EnhancedProjectCard rules
LevelRuleHow it is checked
MUSTARIA: Root is a stretched <a> named through aria-labelledby by its visible text in visual order: category (when shown), title, the description when showDescription is true, then tags. When showDescription is false the description is screen-reader-only and becomes the aria-describedby description instead.Not yet verified: no evidence record. WCAG 4.1.2.
MUSTARIA: The thumbnail image alt is empty and the <video> is aria-hidden because the adjacent project copy provides the equivalent.Not yet verified: no evidence record. WCAG 4.1.2.
MUSTARIA: Project-authored copy can carry an explicit BCP 47 language without overriding localized status text.Not yet verified: no evidence record. WCAG 4.1.2.
MUSTRequired stories produce no axe violations at the configured severity.Automated by npm run test:stories:matrix:ci. WCAG 2.5.8.
MUSTThe accessibility tree (role, name, state) matches the committed snapshot for every required story.Automated by npm run test:stories:matrix:ci. WCAG 1.3.1, 4.1.2.
MUSTThe component remains legible and operable under a real browser forced-colors: active pass.Automated by npm run test:stories:hc.
MUSTEvery documented keyboard interaction works as specified.Not yet verified: no evidence record. WCAG 2.1.1, 2.1.2.
MUSTA human completed an end-to-end accessibility review of this component.Manual review, last on 2026-11-04.

Install and import

  • In-repo only. EnhancedProjectCard is not exported from @digitaltableteur/react, so there is no public import path.