Skip to main content
Copy for LLM

Product Card

The card a product grid is made of. It composes image, price, rating, badge and button — so the pieces you already know keep behaving the way you already know.

Product cards on sale, low stock and sold out
Sale

Brass desk lamp

Warm, dimmable, and heavy enough to stay where you put it.
128 reviews
Previous price €59.00 €39.00
Low stock

Walnut notebook

Dotted, lies flat, survives a bag.
12 reviews
€12.00
Out of stock

Studio chair

The one you stop noticing after a week.
41 reviews
€249.00

Prices and sales

Pass price, and compare-at for what it used to cost. In the EU, the struck price beside a reduction is the lowest price of the 30 days before it, see Price:

<x-wirekit::product-card name="Brass desk lamp" :price="3900" :compare-at="5900" :minor-units="true" currency="EUR" />

The old price renders struck through in a real <del>, and the two amounts read as a pair for a screen reader as well as for the eye. <del> maps to role="deletion", which screen readers do not announce by default, so price prefixes the struck amount with a visually-hidden "Previous price" — announced as content, not as a label on the wrapper. The "Sale" badge on the corner is therefore pure decoration and carries nothing a screen-reader user would miss.

A compare-at that is equal to or lower than price is not treated as a sale. It is not a discount, and striking it through would be a claim the numbers do not support.

Unit price, a from price and price notes

A product sold by weight, volume, length or area carries its unit price beside the selling price, in the same field of vision: unit-price and unit-measure hand it to price, which writes "(€17.50 / 1 kg)". A product whose variants cost different amounts shows the lowest with from, which writes "from" before it.

What the price needs said beside it goes in the priceNote slot: the lowest price of the last 30 days beside a reduction, or "VAT included, plus shipping" with its link. It stands right under the price, apart from the add-to-cart button, in every availability, and a screen reader reads it right after the price. A link in it, or in the description, takes its own click, while a click on the text around it opens the product like the rest of the card.

A product sold by weight, on sale, with its notes
Sale

Coffee beans

Previous price €19.90 €17.50 (€17.50 / 1 kg)
The struck price is the lowest of the last 30 days. VAT included, plus shipping.

Ratings

rating draws the average as stars, and review-count writes how many people gave it beside them: "4.5 stars" from two people and from two thousand are different claims. A product nobody has rated renders no star row at all.

A shop that shows its customers' reviews has to say whether and how it checks that they come from people who bought the product, and in Germany a court has held that this applies to the stars and the count on an overview page as well, right beside them or one step away. The ratingNote slot stands right after the count, in the same row as the stars, for that statement or for a mark that leads to it. It renders only where the card shows stars, and a link in it takes its own click. On the product page the statement itself stands beside the reviews, in the notice slot of review summary.

Stars with a note on how reviews are checked

Wool scarf

56 reviews Verified purchases only
€29.00

Colors and other values

The options slot stands right over the price, for the values of an axis, such as the colors a product comes in: each one a link to its variant, and a link to the rest. Its links take their own click, apart from the card's link. The row takes the free space above the price, and the price follows it down, so the prices in a row of cards stand on one line whether a card has values or not:

Colors over the price

Wool scarf

One color, one size.
€29.00

Each swatch is named by its label, and so is the link around it. A swatch at size="sm" is 24px, the smallest target WCAG 2.5.8 accepts, and a link with visible words, such as "+ 3 more", is named by them. A name in another language than the page's takes lang on its swatch.

Stock

availability What happens
in-stock Nothing (the default)
low-stock A "Low stock" badge. The CTA stays live — it is a nudge, not a wall.
out-of-stock An "Out of stock" badge, and the CTA is disabled and says why

Both states are words, not a wash over the image. A reader who cannot resolve a gray tint sees a perfectly normal product.

Images

image-alt defaults to empty on purpose. The product name is already right there in text, so an alt that repeats it makes a screen reader read the product twice.

Pass one when the image shows something the name does not:

<x-wirekit::product-card
    name="Brass desk lamp"
    image="/img/lamp.jpg"
    image-alt="Lit and angled over a dark desk"
    :price="3900"
/>

href makes the whole card clickable — but the link is the product name, not the card.

That is deliberate. Wrapping the card in one anchor makes the link's accessible name the entire card (image, price, rating, button text, all read as one breathless sentence), and it swallows the add-to-cart button, which cannot nest inside an anchor at all. The pointer gets the big target; the screen reader gets a short, honest name.

A product without a photo

image takes a URL, which is the ordinary case. When the media is not a URL — a painted placeholder, a color field, a <video>, a chart — put it in the media slot instead. The slot wins over image when both are given.

The badge slot sits beside the ones the card works out for itself. Those answer two questions, on sale and in stock; anything else — "New", "Limited", "Last pair" — goes here, and the two stack rather than landing on top of each other. They stand over the corners of the picture, and a card without one shows them in a row of their own above the name.

A card whose media is drawn, not photographed

With neither image nor media, the card draws no media area at all. That is deliberate: a placeholder invented here would appear on every card that legitimately has no picture, and a caller who wants one has the slot to put exactly the box they mean.

A different action

The action slot replaces the default CTA:

<x-wirekit::product-card name="Studio chair" :price="24900" availability="out-of-stock">
    <x-slot:action>
        <x-wirekit::button intent="neutral" class="w-full">Notify me</x-wirekit::button>
    </x-slot:action>
</x-wirekit::product-card>

Props

Prop Type Default Description
level int 3 Heading level for the title, 1–6. 3 suits a card in a grid of products. Set it to match the page's outline, so that no level is skipped; Lighthouse reports a skipped one as heading-order.
name string '' The product. Rendered as the heading.
href string|null null Product page. Makes the card clickable; the name is the link.
image string|null null Cover image.
imageAlt string|null null Accessible name for the image. Empty by default — the name is already in text.
price int|float|null null Current price. null or an empty string shows no price, and no sale.
compareAt int|float|null null What it used to cost. Only treated as a sale when it is higher.
from bool false The price is the lowest of several, the cheapest variant's: it reads "from €19.99".
unitPrice int|float|null null The unit price (Grundpreis) for goods sold by weight, volume, length or area, written beside the price.
unitMeasure string|null null The unit unitPrice refers to, such as 1 kg or L.
currency string config Currency code.
minorUnits bool false Treat the amounts as cents.
locale string|null null Locale the price is written in. Unset, the application's locale.
rating int|float|null null Average out of 5.
reviewCount int|null null How many people rated it.
description string|null null Short line under the name. Clamped to two lines.
availability string 'in-stock' in-stock, low-stock, out-of-stock.
scope string|null null Class-scope override.

Slots

Slot Description
media Replaces the cover image. For media that is not a URL. Wins over image.
badge An extra badge over the media, stacked under the derived one.
ratingNote Right after the number of reviews, in the row of the stars: how the shop checks its reviews, or a link to where it says so. Only where the card shows stars.
options Right over the price: the values of an axis, such as the colors of the product, each a link to its variant. Takes the free space above the price, which follows it down.
priceNote Right under the price, apart from the action: the lowest price of the last 30 days, "VAT included, plus shipping". Read right after the price.
action Replaces the default add-to-cart button.

Accessibility

  • An <article>, so a screen reader can move between products as units.
  • The name is the link, never the whole card — see above.
  • The sale is announced by price: the struck amount carries a visually-hidden "Previous price" prefix, so it never depends on seeing a strike-through or a red badge.
  • Stock states are words in a badge, not a tint.
  • The values in options are links of their own, each named by its swatch's label or its words, and each takes its own click apart from the card's link.
  • A disabled CTA says why in its accessible name ("Out of stock: Brass desk lamp"). A disabled button with no explanation is a dead end.
  • The CTA's accessible name starts with the words printed on it and appends the product after them ("Add to cart: Brass desk lamp"), so someone driving the page by voice can say the label they can read and reach the right button on a grid of cards.
  • The review count sits next to the stars: "4.5 stars" from two people and from two thousand are different claims, and a ratingNote is read right after it.
  • A product nobody has rated renders no star row at all — an empty row implies zero stars, and unrated is not zero.

Keyboard Interaction

Key Action
Tab Move to the product name, then to each link in a slot, such as the values in options, then to the CTA.
Enter Follow the name to the product page.
Enter / Space Fire the CTA when it has focus.

Two stops per card, not one per element — the image, badges and rating are not focusable, because none of them do anything.

Updated in WireKit v2.75.0 (2026-12-01)

Was this page helpful?

Thank you for your feedback!

Voting requires cookies or local storage. What we store