design-infraGitHub
Report a problem or share feedback← Catalog

Scrub Number Field

curatedfree

microkit/scrub-number-field

A number field you drag to scrub and click to type, with a ruler that tracks the gesture.

drag · state — subtlerecipeTechnicalRefined
$npx shadcn@latest add https://microkit.co/r/scrub-number-field.json

Our notes

Figma-style scrubbable number input: drag horizontally to change the value (Shift ×10, Alt ×0.1, re-based mid-drag), click to type, a ruler tracks the gesture and the field nudges at its bounds (keyframe disabled under reduced motion). Pointer capture, no deps. Min/max (0–100) and colours are hard-coded constants — lift them into props. Settings panels and design-tool UIs.
Source
MicroKit
Kind
component
Categories
input
Use as
recipe — technique you apply to your own markup
Applies to
inputform
Motion
on drag, state · subtle · css + js · low cost · respects reduced motion
Tags
css, drag, hard-coded-colours
Licence
MIT ("MIT License — Copyright (c) 2026 Henrique Barone", github.com/henriquegpb/microkit). README credits note that some interactions are adapted from publicly shared examples and Webflow exports.
Live demo
microkit.co
Docs
microkit.co