Skip to content

Wishlist

A wishlist for an online shop: add from product cards, a summary with total and removal, remembered in the browser.

  • Tailwind
  • React
  • CSS
  • WordPress
Open in a new tab

Description

Each product card has an “Add to my list” toggle button (aria-pressed); next to it, the “My wishlist” panel shows the chosen products with their price, the total and a “Remove” button for each, plus “Clear the list”. The list is kept in local storage: it is still there on the next visit, with no customer account (in private browsing it lasts for the visit). Focus is handled with care: after a removal it moves to the next “Remove” button or, if none is left, to the panel heading, so keyboard and screen reader users are never lost. Each action is announced by a role="status" region, and the empty state is explained. Products are described with three attributes (id, name, price) on their card. 44 px buttons, AA contrast in light and dark mode, a one-column grid at 360 px. Example: a tableware and gift shop.

Code

Loading the code…

The code of this component in

Archive contents

liste-envies-html-tailwind.zip3 files · 5 Ko

  • index.html10 Ko
  • README.md4 Ko
  • LICENSE.md1 Ko

Tags

Updated on December 2, 2026.

Reviews

No reviews yet.

In the same spirit

  • A limited-time offer bar: countdown to a fixed date, one-click copyable promo code and a fallback message once the offer is over.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A sales card showing the discount that grows with the cart amount (-10% from €50, -15% from €100…) with a progress bar towards the next tier.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A Christmas gift guide filtered by budget and theme, with the number of ideas announced and an empty state offering to show everything again.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • The last order dates for delivery before Christmas, per shipping method, with the days left worked out from the visitor’s date.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component