Early accessBlack Friday: 20% off new projects with Codevibe, plus 20% off Hostinger hosting. Get your codeBlack Friday: 20% off. Get your code
AboutContact
Book a scoping callhello@codevibe.in+91 70677 09224

Physics-Based · Original concept

Potential Well

A ball in a shallow bowl. Drag it up the slope, release, and it rolls back to the default and settles.

Free codeMIT licenceKeyboard accessible
Download ZIP

How to play

Drag the ball up the bowl and let go.

Keyboard

Tab to the slider, then ← → to step, PgUp PgDn to jump, Home End for the ends.

Under the surface

A native range input is the real control: it owns the value, the keyboard and what screen readers hear. Everything you see is drawn from it.

What it needs

No libraries, just HTML, CSS and JavaScript
Uses Vibration

The concept

What Potential Well really is.

A ball in a bowl: drag it up the slope and let go, and it rolls back to the default and settles. The return itself explains what the default is.

Where to use it

5 real-world places this slider fits, from product UIs to marketing pages.

  1. 01

    Audio and photo editing

    Pitch bend or temporary adjustments that spring back to neutral.

  2. 02

    Game controls

    Throttle or steering that returns to centre on release.

  3. 03

    Physics education

    Teaching potential energy, equilibrium and damping interactively.

  4. 04

    Preview controls

    "Peek" interactions that show a change while held, then reset.

  5. 05

    Playful landing pages

    A memorable hero interaction that invites people to play.

Implementation

The source, ready to copy.

Two files and a small shared scaffold. Copy them, or take the whole package.

ZIP

Loading slider.js…

Plain HTML, CSS and JavaScript · no build step · MIT licenceThe ZIP adds a standalone demo page, a React wrapper and the licence file

Work with Codevibe

Like the Potential Well? We can build it for you.

If this design fits your product, we are happy to adapt it to your brand, or design something new that feels just as good to use. The same team that made this library builds websites, apps and product UIs that people enjoy using.

  • Custom interactions designed around your brand and your users, not a template.
  • Built properly: fast, responsive and accessible, like every slider here.
  • From one component to a full product: websites, web apps, mobile apps and design systems.

Just want this slider? Download the code free, no form needed.

What are you building?

1 / 3

Two taps. A senior engineer, not a salesperson, reads this.

Project
When do you want to start?

NDA on request before detailed scoping. Your details are used only to reply. Privacy

More sliders

All 39 sliders →
Physics-Based

Magnetic filings

A magnet on a steel rule. Iron filings align to it and the marks attract it, but it can rest anywhere.

Drag the magnet; the filings lean toward it and the marks pull it inExplore Magnetic filings →
Physics-Based

Elastic overdrag

A rubber band you can over-pull. Past the ends the track squishes and stretches, then springs back when you let go.

Drag past either end; the track stretches and snaps backExplore Elastic overdrag →
Physics-Based

Momentum puck

An air-hockey puck on a rail. Fling it and it coasts with momentum, bounces off the end with a knock, and settles.

Fling the puck; it glides, hits the end and knocksExplore Momentum puck →
// LET'S BUILD SOMETHING

Ready to build?

Tell us what you are working on. We will respond within 12 hours on working days with an honest assessment and a recommended path forward.

Call +91 70677 09224
hello@codevibe.in · +91 70677 09224 · Gurugram, India