BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/kinetic/scrub-number-field

Scrub Number Field

kinetic/scrub-number-field
FreeComponent

A Figma-like scrub number input with drag-to-scrub, click-to-edit, digit animation by Calligraph, Up/Down arrow nudging, and wheel nudging.

Install it

npx shadcn@latest add https://kinetic.itsjay.in/r/scrub-number-field.json

Source

components/ui/scrub-number-input.tsxkinetic.itsjay.in/r/scrub-number-field.json · first 6 KB
1"use client"
2
3import {
4 useCallback,
5 useEffect,
6 useLayoutEffect,
7 useMemo,
8 useRef,
9 useState,
10 type ChangeEvent,
11 type ComponentProps,
12 type CSSProperties,
13 type KeyboardEvent,
14 type PointerEvent,
15 type RefObject,
16} from "react"
17import { Calligraph } from "calligraph"
18import {
19 GripHorizontal,
20 GripVertical,
21 Move,
22 MoveHorizontal,
23 MoveVertical,
24 Percent,
25 type LucideIcon,
26} from "lucide-react"
27import { useReducedMotion, motion } from "motion/react"
28
29import { InputGroup, InputGroupAddon } from "@/components/ui/input-group"
30import { Input } from "@/components/ui/input"
31import { useControllableState } from "@/hooks/use-controllable-state"
32import { useDisplayOverflowTruncated } from "@/lib/scrub-number-overflow"
33import {
34 boundOverflow,
35 clampNumber,
36 countDraftDecimalPlaces,
37 formatDisplayValue,
38 getAtBound,
39 getBoundEdge,
40 getScrubPointerDelta,
41 hasExceededScrubThreshold,
42 isFineModifierPressed,
43 applyStepDelta,
44 consumeWheelDelta,
45 normalizeCoarseModifier,
46 normalizeFineModifier,
47 normalizeFiniteNumber,
48 normalizeNumberFieldBounds,
49 normalizePositiveFiniteStep,
50 normalizeScrubThreshold,
51 normalizeWheelDelta,
52 normalizeWheelSensitivity,
53 quantizeNumber,
54 resolveActiveStep,
55 resolveFineStep,
56 resolveQuantizeStep,
57 resolveExclusiveModifiers,
58 resolveScrubStepModifiers,
59 preserveDisplayDraft,
60 resolveDisplayDecimalPlaces,
61 sanitizeNumericDraft,
62 toModifierKeys,
63 type CoarseModifier,
64 type FineModifier,
65} from "@/lib/scrub-number-math"
66import { cn } from "@/lib/utils"
67import { cva } from "class-variance-authority"
68
69import "./scrub-number-input.css"
70
71export {
72 boundOverflow,
73 clampNumber,
74 countDraftDecimalPlaces,
75 formatDisplayValue,
76 formatMinimalDisplayValue,
77 getAtBound,
78 getBoundEdge,
79 getDecimalPlaces,
80 getCoarseModifierLabel,
81 getFineModifierLabel,
82 getScrubPointerDelta,
83 hasExceededScrubThreshold,
84 isCoarseModifierPressed,
85 isFineModifierPressed,
86 isModifierKeyPressed,
87 applyStepDelta,
88 consumeWheelDelta,
89 normalizeCoarseModifier,
90 normalizeFineModifier,
91 normalizeFiniteNumber,
92 normalizeNumberFieldBounds,
93 normalizePositiveFiniteStep,
94 normalizeScrubThreshold,
95 normalizeWheelDelta,
96 normalizeWheelSensitivity,
97 quantizeNumber,
98 resolveActiveStep,
99 resolveCoarseModifierKey,
100 resolveFineModifierKey,
101 resolveFineStep,
102 resolveQuantizeStep,
103 resolveExclusiveModifiers,
104 resolveScrubStepModifiers,
105 preserveDisplayDraft,
106 resolveDisplayDecimalPlaces,
107 toModifierKeys,
108// … truncated

What it pulls in

npm packages

  • calligraph
  • lucide-react
  • motion

Other registry items

  • input
  • input-group

Files it writes

  • components/ui/scrub-number-input.tsx
  • components/ui/scrub-number-input.css
  • lib/scrub-number-overflow.ts
  • lib/scrub-number-math.ts
  • hooks/use-controllable-state.tsx

Facts

Registry
kinetic
Type
registry:ui
Access
Free
Files written
5
Licence
MIT
In the index
at or before 2026-08-12
Last confirmed
today

Go to the source

kinetic.itsjay.in jay15git/Kinetic on GitHub Raw registry item This item as JSON

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex