Skip to content

Rotary Knob

A knob you turn by dragging up and down on the cap or round the ring.

$149 once · every Pro piece

Customize

The value arc is a hairline with a bone fill whose head runs hot while it turns; with detents it clicks between positions with a small overshoot and a haptic tap. Wheel, arrows, PgUp/PgDn, Home/End and double-click to reset all work.

Install

npx shadcn@latest add @obsyde/rotary-knob

Needs your licence key · Get Pro

Usage

Import it from where the CLI puts it, or copy the files below by hand.

import { RotaryKnob } from '@/components/obsyde/ember/rotary-knob/RotaryKnob';

export function Example() {
  return (
    <RotaryKnob defaultValue={40} />
  );
}

Files

What you get with Pro: plain React, TypeScript and CSS, with no dependencies.

  • ember/rotary-knob/RotaryKnob.tsxcomponent
  • ember/rotary-knob/rotary-knob.cssstyles
  • ember/rotary-knob/RotaryKnobDemo.tsxdemo
  • ember/tactile-kit/kit.tsshared
  • ember/shared/accent.tsshared
  • ember/shared/spring.tsshared
  • ember/shared/ember.cssshared

API

PropTypeDefault
accentAccent'ember' | 'volt' | 'arc''ember'
valueValuenumber40
minMinnumber0
maxMaxnumber100
stepStepnumber1
detentsDetentsnumber0
sizeSizenumber120
labelLabelstring—
unitUnitstring—
disabledDisabledbooleanfalse