Skip to content

ProductCard

One product in a listing: the packshot on Snow with the article number and the name, and on hover or focus the colours and the price.

In Figma: Product Card (node 25:2701). In code: components/ui/product-card.tsx

Example

0510T-TIME® T-shirtkr. 99,00 (kr. 79,20 ex. moms)17 farver
0510T-TIME® T-shirtkr. 99,00 (kr. 79,20 ex. moms)17 farver
import { ProductCard } from '@/components/ui/product-card';

<ProductCard
  href="/produkter/0510"
  sku="0510"
  name="T-TIME® T-shirt"
  image={packshot}
  price="kr. 99,00"
  priceNote="(kr. 79,20 ex. moms)"
  swatches={colours}
  moreColours={13}
/>

Props

PropTypeDefaultWhat it does
href (required)stringWhere the card leads. The whole card is the link.
sku (required)stringThe article number, such as "0510".
name (required)stringThe product name.
image (required)stringThe packshot. Shown on Snow, multiplied, never cropped.
pricestringAlready formatted, such as "kr. 99,00". Never computed in the card.
priceNotestringAlready formatted, such as "(kr. 79,20 ex. moms)".
swatchesProductCardSwatch[]{ label, image } for the colours shown.
moreColoursnumberHow many more colours there are, shown as +13.
expanded'hover' | 'always''hover'Hover shows price and colours on pointer hover and keyboard focus, as in Figma. Always is for touch screens.
labels{ colours?: (count: number) => string }Texts read aloud. Pass translations here.

Do

  • Lay cards out in a grid with the seam (2 px) between them: they are tiles of one block.
  • Pass the price as the shop formats it. The card never calculates.
  • Use expanded="always" where there is no hover, such as on a phone.

Do not

  • Do not put a packshot on any ground but Snow.
  • Do not crop the packshot or give it a shadow.
  • Do not invent a price, a name or an article number for a card.

Accessibility

  • The name is the link and covers the whole card.
  • The price and the number of colours are read aloud once, also when the panel is closed.

Tokens it uses

  • color.packshot.fill
  • color.neutral.0
  • color.neutral.200
  • color.neutral.500
  • color.neutral.900
  • space.inline.1
  • space.inline.3
  • space.seam
  • type.body.sm
  • type.body.xs
  • component.product-card.swatch-size
  • component.product-card.swatch-radius
  • component.product-card.swatch-padding