Quote simulator with options
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
Description
For a tradesperson or service provider who wants to give a price range before the first appointment: bathroom, kitchen, painting, garden, photography, website. The example, a plumber’s, offers three base packages as radio buttons, six options to tick, a quantity per square metre and the VAT rate depending on the age of the home (10 % for improvement work in a home over two years old, 20 % otherwise). Each choice updates the list of items, the pre-tax total, the VAT and the total including tax, computed in cents to avoid rounding errors; on large screens, the estimate stays visible while scrolling. An invalid quantity is flagged when leaving the field and left out of the total. The full summary (package, options, totals) fills a hidden field of the contact form: it is sent with the visitor’s name, email, optional phone, site postcode and notes, and shown in the confirmation. Choices are also sent as regular fields, so the form still works without JavaScript. To send it, listen to the simulateur-devis:envoi event, which carries the form data, and post it to your service (Formspree, your own API…). Prices and labels are edited in the data-sdo-price and data-sdo-name attributes of each box. Accessibility: real fields grouped with fieldset and legend, arrow keys between packages, error messages tied with aria-describedby and aria-invalid, focus on the first field to fix and then on the confirmation, total announced to screen readers through an aria-live region after a short pause, AA contrast in light and dark mode, 44 px targets, no horizontal scrolling from 360 px, transitions turned off with prefers-reduced-motion. No dependencies.
Code
Loading the code…
The code of this component in
Archive contents
formulaire-simulateur-devis-options-html-tailwind.zip3 files · 10 Ko
- index.html30 Ko
- README.md5 Ko
- LICENSE.md1 Ko
Tags
Updated on December 3, 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

A quote request form for tradespeople: the customer describes the work, picks a start date range and attaches up to six site photos, each with a preview, its size and a button to remove it.
- Tailwind
- React
- CSS
- WordPress

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

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