E-commerce

Reviews & UGC

Product reviews for an optical-frame store in Beirut: a star histogram that filters, customer photos in a swipeable lightbox, verified-buyer badges, helpful votes, sort and search, a Q&A tab, and a write-a-review form with star rating, fit, photo upload and inline validation. A “Customers say” summary is built locally from the reviews and rewrites itself when a new one is posted.

Use the Live / Loading / Empty / Error switch at the top to see every state.

Why it matters

Reviews with real photos and an honest summary answer the questions that stop people buying (fit, comfort, build quality) right on the product page, while moderation, verified badges and store replies keep the section trustworthy.

How it works

  1. 01Shoppers filter by star rating, topic, photos or verified buyers, sort by helpfulness or date, and search inside the reviews with matching words highlighted.
  2. 02Writing a review takes a star rating, colour, size, fit, title and text, plus up to four photos that are previewed and kept in memory only; the email is matched to an order to show the Verified badge (simulated).
  3. 03The “Customers say” card groups mentions into topics such as comfort, build and lenses, counts positive and critical ones and rewrites its summary when reviews change. It runs locally in the browser and is labelled as simulated AI.

See it inside a full build