Parameter knob

Displays a rotary parameter over a native horizontal range input, with named values, units, and a 64px control.

35 %

A compact parameter

Effect inspector

35 %

Drag horizontally or use the arrow keys to adjust.

Use it for

  • A compact bounded parameter with an explicit label, step, and unit.
  • value/defaultValue/onValueChange and native form attributes; the ref reaches the range input.
  • Horizontal pointer movement and the browser's native range keyboard behavior.

Not for

  • Implying circular pointer dragging; the dial is a visual representation of a horizontal range.
  • Non-finite values or invalid bounds; they render an unavailable disabled control.

Three ways in. They share one source, so the pixels match whichever you pick.

1. Import the package

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.

2. Vendor the source

npx @noorddev/vlak-cli add parameter-knob

The StyleX leaf lands in components/vlak/, for your own compiler to own. See StyleX.

3. Through shadcn

npx shadcn add https://vlak.dev/r/parameter-knob.json

The same registry item, installed by shadcn's CLI.

CSS only

<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="%" />

ParameterKnob

A rotary display driven by a native horizontal range input.

PropTypeDefaultDescription
labelrequiredReactNode
valuenumber
defaultValuenumber
onValueChange(value: number) => void
minnumber0
maxnumber100
stepnumber1
unitstring

Also accepts Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "min" | "max" | "step">.

KeysDoes
TabFocuses the native range input and its visible dial ring.
Arrow keys, Home, EndUses 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>
.rs-parameter-knob.rs-parameter-knob-label.rs-parameter-knob-control.rs-parameter-knob-pointer.rs-parameter-knob-input.rs-parameter-knob-value