@latticejs/gauge
v1.0.1-beta.2
Published
A configurable gauge-like component built upon `canvas-gauges`.
Downloads
5
Readme
@latticejs/gauge
A configurable gauge-like component built upon canvas-gauges
.
Install
npm install @latticejs/gauge
Usage
import React from 'react';
import Gauge from '@latticejs/gauge';
const MyGauge = () => (
<Gauge value={42} />
);
export default MyGauge;
The above snippet will render a basic gauge with a material look'n'feel. It also support themes (dark, light).
API
value
number
| Defaults to 0
Used to indicate gauge default value.
settings
object
| Defaults to {}
Lattice's Gauge exports the same API configuration as canvas-gauges. Use this option to pass any specific configuration.
Different configuration can be found on canvas-config. Feel free to learn how to do different things using the examples.