React + TypeScript knob/fader library with a headless interaction core (rotary, relative-drag and track modes, wheel, keyboard, a11y), SVG primitives, nine prebuilt skins, seven-segment display engine, and a Vite showcase with gallery, live playground and API docs.
44 lines
1.7 KiB
TypeScript
44 lines
1.7 KiB
TypeScript
// Core
|
|
export { useKnob, type UseKnobResult } from './hooks/useKnob';
|
|
export { Knob, type KnobProps } from './components/Knob';
|
|
export { useKnobContext, type KnobRenderContext } from './core/context';
|
|
export type { KnobCoreProps, KnobState, InteractionMode } from './core/types';
|
|
export {
|
|
clamp,
|
|
roundTo,
|
|
snapToStep,
|
|
decimalsFromStep,
|
|
findClosest,
|
|
linearTaper,
|
|
logTaper,
|
|
powTaper,
|
|
type Taper,
|
|
polarToCartesian,
|
|
describeArc,
|
|
angleFromPoint,
|
|
angleFromNormalized,
|
|
normalizedFromAngle,
|
|
} from './core/math';
|
|
|
|
// Composable primitives
|
|
export { Arc, type ArcProps } from './primitives/Arc';
|
|
export { Pointer, type PointerProps } from './primitives/Pointer';
|
|
export { Ticks, type TicksProps } from './primitives/Ticks';
|
|
export { Face, type FaceProps } from './primitives/Face';
|
|
export { KnobValue, KnobLabel, type KnobValueProps, type KnobLabelProps } from './primitives/Text';
|
|
|
|
// Digital
|
|
export { SegmentDisplay, type SegmentDisplayProps } from './digital/SegmentDisplay';
|
|
|
|
// Prebuilt skins
|
|
export type { SkinProps } from './skins/shared';
|
|
export { FlatKnob, type FlatKnobProps } from './skins/FlatKnob';
|
|
export { MetalKnob, type MetalKnobProps } from './skins/MetalKnob';
|
|
export { RubberKnob, type RubberKnobProps } from './skins/RubberKnob';
|
|
export { VintageKnob, type VintageKnobProps } from './skins/VintageKnob';
|
|
export { LEDKnob, type LEDKnobProps } from './skins/LEDKnob';
|
|
export { NeonKnob, type NeonKnobProps } from './skins/NeonKnob';
|
|
export { SteppedKnob, type SteppedKnobProps } from './skins/SteppedKnob';
|
|
export { Fader, type FaderProps } from './skins/Fader';
|
|
export { LEDFader, type LEDFaderProps, type LEDFaderZone } from './skins/LEDFader';
|
|
export { GlowFilter, type GlowFilterProps } from './primitives/GlowFilter';
|