Modus UI

Orbit Knob

Web (React)

A flickable rotary knob with a tracer tail in theme ink and a serif readout.

Drag up or down to turn it, flick to let it coast, or tap a point on the track to jump there. While it moves, a primary-coloured tail chases the head; arrow keys, Page Up/Down, Home and End work when focused.

38%Gain
Modus / Orbit Knob

Installation

CLI

npx @modus-ui/cli add orbit-knob

Manual

  1. Copy the code from the component tab.
  2. Create a file at components/ui/orbit-knob.tsx.
  3. Paste the code.

Usage

tsx
import { OrbitKnob } from "@/components/ui/orbit-knob";

export default function Example() {
  return <OrbitKnob />;
}

Props

PropTypeDefaultDescription
valueany--
defaultValuenumber38-
minnumber0-
maxnumber100-
stepnumber1-
unitstring"%"-
labelstring"Gain"-
accentstring"hsl(var(--primary))"-
inkstring"hsl(var(--foreground))"-
sizenumber250-
sweepnumber270-
thicknessnumber3-
speednumber25-
tapBouncenumber0.2-
flickBouncenumber0.1-
momentumnumber1-
cometReachnumber180-
cometWidthnumber12-
disabledbooleanfalse-
onChangeany--
onChangeEndany--

Comments

  • No comments yet.