BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/moco/scrub

Scrub Number

moco/scrub
FreeComponent

Tangle-style inline number scrubber: drag the variable itself, with a compact range input for pointer and keyboard access.

Live preview

live · rendered by the registry
Rendered by moco on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://mocoui.site/r/scrub.json

Source

registry/scrub/scrub.tsxmocoui.site/r/scrub.json
1"use client";
2
3import * as React from "react";
4import "./scrub.css";
5
6export type ScrubNumberProps = {
7 value: number;
8 onChange: (n: number) => void;
9 min: number;
10 max: number;
11 step?: number;
12 /** Accessible label for the range input. */
13 label: string;
14 /** Formats the displayed value; defaults to String(value). */
15 format?: (n: number) => string;
16 /** The letter or word that doubles as the drag handle. */
17 handle: string;
18};
19
20/**
21 * A Tangle-style inline control: the variable itself is a drag handle, and a
22 * compact range input sits inline with the text for pointer and keyboard use.
23 */
24export function ScrubNumber({
25 value,
26 onChange,
27 min,
28 max,
29 step = 1,
30 label,
31 format,
32 handle,
33}: ScrubNumberProps) {
34 const id = React.useId();
35 const drag = React.useRef<{ x: number; v: number } | null>(null);
36 const text = format ? format(value) : String(value);
37
38 const clamp = (n: number) => Math.min(max, Math.max(min, Math.round(n / step) * step));
39
40 const onPointerDown = (e: React.PointerEvent) => {
41 (e.target as HTMLElement).setPointerCapture(e.pointerId);
42 drag.current = { x: e.clientX, v: value };
43 };
44 const onPointerMove = (e: React.PointerEvent) => {
45 if (!drag.current) return;
46 const perPx = (max - min) / 320;
47 onChange(clamp(drag.current.v + (e.clientX - drag.current.x) * perPx));
48 };
49 const onPointerUp = () => {
50 drag.current = null;
51 };
52
53 return (
54 <span className="moco-scrub">
55 <span
56 className="moco-scrub-handle"
57 onPointerDown={onPointerDown}
58 onPointerMove={onPointerMove}
59 onPointerUp={onPointerUp}
60 onPointerCancel={onPointerUp}
61 aria-hidden="true"
62 >
63 {handle}
64 </span>
65 <label className="moco-sr-only" htmlFor={id}>
66 {label}
67 </label>
68 <input
69 id={id}
70 className="moco-scrub-mini"
71 type="range"
72 min={min}
73 max={max}
74 step={step}
75 value={value}
76 aria-valuetext={`${label}: ${text}`}
77 onChange={(e) => onChange(Number(e.target.value))}
78 />
79 <span className="moco-num">{text}</span>
80 </span>
81 );
82}

What it pulls in

Other registry items

  • https://mocoui.site/r/tokens.json

Files it writes

  • registry/scrub/scrub.tsx
  • registry/scrub/scrub.css

Facts

Registry
moco
Type
registry:component
Access
Free
Files written
2
Licence
MIT
In the index
at or before 2026-08-16
Last confirmed
today

Go to the source

Docs on moco mocoui.site shreya0204/moco on GitHub Raw registry item This item as JSON

More from moco

All 20 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
CodecodemocoComponentsFree1 dep · 3 files
ComparecomparemocoComponentsFreeno deps · 2 files
Count UpcountupmocoComponentsFreeno deps · 2 files
CovercovermocoComponentsFreeno deps · 2 files
Diagram KitdiagrammocoComponentsFreeno deps · 2 files
Dot GriddotgridmocoComponentsFreeno deps · 2 files
FigurefiguremocoComponentsFreeno deps · 2 files
HookshooksmocoComponentsFreeno deps

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