Scrub Input
CSSDrag a number sideways to change it while the digits roll. Press it to type.
Max tokens
1200
Top P
0.90
Timeout
30s
Install
$ npx shadcn@latest add https://spotcheckui.com/r/scrub-input.jsonNo motion engine needed.
Usage
import { ScrubInput } from "@/components/spotcheck/scrub-input"
<ScrubInput label="Max tokens" value={tokens} onValueChange={setTokens} min={0} max={4000} step={50} />Hold Shift while dragging to move ten steps at a time.
Props
- label * Required
stringDefault —Names the control for screen readers and prints above the value. - value
numberDefault —The current value, when you control it. - defaultValue
numberDefault 0The starting value, when it manages itself. - onValueChange
(value: number) => voidDefault — - min
numberDefault -Infinity - max
numberDefault — - step
numberDefault 1How much one step changes the value. - unit
stringDefault —Printed after the value, such as "ms". - className
stringDefault —
Keyboard
| ↑ → | Increase by a step |
|---|---|
| ↓ ← | Decrease by a step |
| Page Up | Increase by ten steps |
| Page Down | Decrease by ten steps |
| Home | Jump to the minimum |
| End | Jump to the maximum |
| Enter | Type a value |
| Esc | Cancel typing |
Reduced motion
Digits change at once, without rolling.