A compact parameter
Effect inspector
Drag horizontally or use the arrow keys to adjust.
Displays a rotary parameter over a native horizontal range input, with named values, units, and a 64px control.
Effect inspector
Drag horizontally or use the arrow keys to adjust.
Three ways in. They share one source, so the pixels match whichever you pick.
npm install @noorddev/vlak-react
// once, next to your app's root
import "@noorddev/vlak-react/css";
import { ParameterKnob } from "@noorddev/vlak-react";Precompiled React and one stylesheet. No compiler to configure. Per-component imports work too: @noorddev/vlak-react/components/parameter-knob.
npx @noorddev/vlak-cli add parameter-knob
The StyleX leaf lands in components/vlak/, for your own compiler to own. See StyleX.
npx shadcn add https://vlak.dev/r/parameter-knob.json
The same registry item, installed by shadcn's CLI.
<link rel="stylesheet" href="node_modules/@noorddev/vlak/css/vlak.css" />
No React. Link vlak.css and use the markup and classes below.
import { ParameterKnob } from "@noorddev/vlak-react";
<ParameterKnob label="Mix" name="mix" min={0} max={100} step={1} defaultValue={35} unit="%" />A rotary display driven by a native horizontal range input.
| Prop | Type | Default | Description |
|---|---|---|---|
labelrequired | ReactNode | ||
value | number | ||
defaultValue | number | ||
onValueChange | (value: number) => void | ||
min | number | 0 | |
max | number | 100 | |
step | number | 1 | |
unit | string |
Also accepts Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "min" | "max" | "step">.
| Keys | Does |
|---|---|
| Tab | Focuses the native range input and its visible dial ring. |
| Arrow keys, Home, End | Uses native range stepping and bounds unless read-only. |
<div class="rs-parameter-knob"><label class="rs-parameter-knob-label" for="mix-knob">Mix</label><div class="rs-parameter-knob-control"><span class="rs-parameter-knob-pointer" aria-hidden="true" style="transform:rotate(0deg)"></span><input class="rs-parameter-knob-input" id="mix-knob" type="range" min="0" max="100" step="1" value="50" aria-valuetext="50%" /></div><span class="rs-parameter-knob-value">50%</span></div>