About this set
Shop product cards with a soft gradient image area, a New or sale badge, a round wishlist heart, the category, product name, star rating with review count, the price and an Add to cart button. The second card shows a sale: a red percentage badge and the old price struck through beside the new one. The product name is a stretched link that covers the card, so clicking the picture or any empty space opens the product page, while the wishlist and Add to cart buttons are lifted above that layer and stay separate targets. The wishlist button is a toggle: a few lines of JavaScript flip aria-pressed, and CSS swaps the outline heart for a filled red one. Hidden text gives screen readers the rating as a sentence, says Was and now around the two prices, and adds the product name to each Add to cart button. Hovering tilts and scales the product picture. Replace the emoji with an img and alt text for real products. Bootstrap builds it from .card-img-top, .badge, .stretched-link and .btn with .z-2; Tailwind uses the aria-pressed: variant for the heart.
Whatβs included
- Product name as a stretched link with the buttons layered above it
- Wishlist heart toggle that uses aria-pressed
- New and sale badges, struck-through old price read out as Was and now
- Star rating with a screen-reader sentence in place of the glyphs
- Picture tilt on hover, off under prefers-reduced-motion
Accessibility
The product name is the card's one link, and the wishlist and cart buttons carry the product name in their accessible names. The wishlist button reports its state with aria-pressed; the stars and count are hidden in favour of text such as Rated 4.9 out of 5 from 212 reviews. Buttons show a 3px dark outline on focus, the card shows a ring while its link is focused, and motion is removed under prefers-reduced-motion.
Customise it
Change the image-area gradients in .pd-m1 and .pd-m2, the badge colours in .pd-badge and .pd-sale, and the button colour in .pd-add. In Bootstrap the Add to cart colours are --bs-btn-bg on .pd-add; in Tailwind edit the bg- utilities and the aria-pressed:text- colour on the heart.




















