Skip to content

Knob

widgetsinput

Knob component

Installation

$ bunx termuijs add knob

Copies the source into src/components/knob/ and installs @termuijs/core, @termuijs/widgets.

Usage

ts
import { Knob } from '@termuijs/widgets'
ts
new Knob(label?: string, style: Partial<Style> = {}, opts: KnobOptions = {})

API Reference

Knob

PropTypeRequiredDescription
labelstringoptional
minnumberoptional
maxnumberoptional
stepnumberoptional
colorColoroptional
showValuebooleanoptional
onChange(value: number) => voidoptional
#input#knob