remold/ui

Range slider

A price range slider with a histogram behind it: while you drag a handle its price lifts out of the label and rides above the handle, then flies back when you let go.

Base UIMotion

Price per night
237 stays in this range

Things to try

  • Drag a handle. Its price moves from the label to above your finger.
  • Let go. The price flies back into the label.
  • Watch the bars. They darken inside your range, and the count below updates.

Install

npx shadcn@latest add https://your-docs-site/r/range-slider.json

Dependencies

The install command adds these for you. If you copy the code by hand, install them yourself.

npm install @base-ui/react @remold-ui/react motion

How it works

  • Built on Base UI. Slider with a thumb for each end gives dragging, keyboard and the minimum gap between them.
  • The price follows you. The label's price and the bubble share a Motion layoutId, so it travels between them.
The prices and counts are made up.

On this page