Vibary.ai
← Vibe Coding

Slider Drag Value

The handle stays under the finger while held, with a value bubble that rises on grab.

formsfriendlyenergeticinteraction · finite · intermediate · ~0.3s
Interactive · click to play
Variant

The animated component in this preview is rendered from the canonical file shown here. The surrounding demo shell only provides context and is not part of the copied code.

319 lines · react + motion only
import { useId, useRef, useState, type KeyboardEvent, type PointerEvent } from "react";
import { AnimatePresence, motion, useReducedMotion } from "motion/react";

/**
 * Vibary · Slider Drag Value
 *
 * The handle sits exactly under the finger while it is held, and the
 * value bubble rises out of it on grab. Let go and the handle settles on

About this pattern

The rule that makes a slider feel connected: while the pointer is down there is no easing at all, because a handle that springs toward the finger reads as lag, not as polish. The spring is kept for the movements the user is not steering — an arrow-key nudge, a click further along the track — where it turns a jump into a travel that can be followed. The handle swells under the grab and the readout bubble rises out of it, translating and fading rather than scaling, since it is a number and numbers deform badly. Arrows, Page keys, Home and End all move it, and the formatted amount goes into aria-valuetext.

Budget or spend controlVolume or brightnessFilter thresholdImage adjustment

Where it shows up

Screens we drew to show where this motion usually sits. Illustrations, not captures of any product.

  • Add a supplierTwo fields now, the rest later
    Legal name
    Ridgeline Supply Co.
    Country
    Sweden
    VAT number
    SE556031820101
    Save supplier
    Form

    Direct tracking under the finger, with the swell as the only grab feedback.

Related patterns