Skip to content

NPS satisfaction survey

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
Open in a new tab

Description

The Net Promoter Score is one question, but the score alone explains nothing. This survey shows the 0 to 10 scale as real radio buttons (keyboard arrows, 44 px targets, one row when there is room and two rows on mobile thanks to a container query), then reveals a follow-up question adapted to the NPS category: “What should we improve first?” from 0 to 6, “What are we missing to earn a 10?” at 7 or 8, “What did you like most?” at 9 or 10. The comment is optional, with a counter and a 500-character limit. The thank-you message also changes with the score, and the form locks after sending to avoid duplicates. Questions and thresholds are one object at the top of the script; sending plugs into your survey tool. Scale bounds linked with aria-describedby, errors flagged with aria-invalid, focus on the scale or comment to fix, AA contrast in light and dark mode, no horizontal scrolling from 360 px. Example: the survey sent after a delivery.

Code

Loading the code…

The code of this component in

Archive contents

formulaire-satisfaction-nps-html-tailwind.zip3 files · 6 Ko

  • index.html15 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
  • An honest unsubscribe page: address prefilled from the link, choice between stopping everything or receiving less, optional reason and an undo.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component