Skip to content

Line item

Image, title link, variant, unit price, a Quantity input, a remove button and the line total. The image links to the product too but is skipped by keyboard and screen readers, since the title already does that job.

£136

  • id: unique per row, used for the quantity field id (required)
  • title, href, image, price: required
  • variant: chosen options, such as “Sand / M”
  • compareAt: original unit price, shows a sale price when higher
  • quantity: starting quantity (default 1); the total is price times quantity when rendered
  • density: compact or comfortable (default)
<LineItem
id="linen-shirt"
title="Relaxed linen shirt"
href="/products/linen-shirt/"
image="/images/shirt.jpg"
variant="Sand / M"
price={68}
quantity={2}
/>
density="compact", as in a cart drawer