Skip to content

Customer review form

A 1 to 5 star rating that works with the keyboard, a comment with a character counter, the first name, consent to publication and a thank-you message that recalls the rating.

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

Description

Designed so a small business can collect its own customer reviews. The stars are real radio buttons: arrow keys change the rating, each star is announced ("4 stars out of 5, very good") and the stars light up in pure CSS, even without JavaScript. The comment requires at least 20 characters, with a counter; only the first name is published. The consent checkbox is never pre-ticked and its note explains moderation (review within 48 hours, negative reviews published like the others, removal on request), as French consumer law requires for online reviews. Fields are checked when leaving them, never during the first draft; on submit, each error appears under its field and focus moves to the first one to fix, then a personal thank-you recalls the rating. Accessibility: fieldset and legend for the rating, aria-invalid and aria-describedby on every field, focus moved to the confirmation, AA contrast in light and dark modes, animations stopped with prefers-reduced-motion. Plug in storage: avf:submit event in HTML, onSubmit prop in React.

Code

Loading the code…

The code of this component in

Archive contents

formulaire-avis-client-html-tailwind.zip3 files · 8 Ko

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

Tags

Updated on December 2, 2026.

Reviews

No reviews yet.

In the same spirit

  • A recruitment form for small businesses: target position, introduction, CV checked in the browser and GDPR consent, with inline errors.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A quote request form whose labels, hints and error messages are full French sentences, still readable at 320 px: nothing overflows, nothing is cut off, and each error is tied to its field.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Visitors pick a package and tick options: the pre-tax total, VAT and total including tax update live, and the summary is sent with the contact form.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A short NPS survey: a 0 to 10 score as radio buttons, then a follow-up question adapted to whether the customer is a detractor, passive or promoter.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component