SVG-based knobs for React applications
npm install --save react-knobs
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'
}
/>
);
}
MIT © Andrii Polishchuk