Skip to content

apo91/react-knobs

Repository files navigation

react-knobs

SVG-based knobs for React applications

NPM JavaScript Style Guide

Install

npm install --save react-knobs

Usage

import React from 'react';
import { FullonKnob /*, MidlaneKnob, ConcentricKnob, BlindfoldKnob, ThemeContext */ } from 'react-knobs';

function VolumeKnob(props) {
  return (
    <FullonKnob
      title="Volume"
      value={props.value}
      defaultValue={0.825}
      onChange={props.onChange}
      formatter={(value) =>
        value < 0.01
          ? '-inf'
          : Math.round(-64 + value * 70) + ' dB'
      }
    />
  );
}

License

MIT © Andrii Polishchuk

About

🎛️ SVG-based knobs for React applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages