Skip to content

Dual price range slider

A two-handle slider to pick a price range, synced with two number fields and filtering the list live.

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

Description

On a catalogue, a shop or listings, the visitor drags the minimum and maximum price handles; the coloured band between them follows, the legend shows “from €150 to €700” and the list filters at once with the number of results announced. For precision, two number fields let users type the amounts, synced both ways. The handles never cross and out-of-range values are brought back into range. Under the hood these are two stacked native sliders: arrows, Page Up/Down, Home and End work with the keyboard on each handle, each one has a name (“Minimum price”, “Maximum price”) and a value read in euros (aria-valuetext). Bounds, step and starting values are set with the min, max, step and value attributes. 24 px handles in a 44 px area, visible focus outline, AA contrast in light and dark mode, no overflow at 360 px.

Code

Loading the code…

The code of this component in

Archive contents

curseur-double-prix-html-tailwind.zip3 files · 5 Ko

  • index.html9 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