Meter
Visualize values in a meter, like checking your car’s fuel gauge, great for displaying measurements at a glance.
Basic
A meter displays a value within a specified range, showing how much of the total range is currently occupied. Unlike a progress bar, which typically indicates progress towards completing a task over time, a meter reflects a specific measurement or quantity at a given moment.
Installation
If you hit any issues, make sure you check out the installation guide here.
npm i [email protected]
Composed Components
When you plug this component from the CLI, it autoloads all the composed components. No need to toss 'em in one at a time.
The Meter's decked out with several components to make it bangin'.
Manual Installation
Sometimes, using the CLI is the way to go, so make sure you install the necessary dependencies for the components you want to use.
Anatomy
Import the components and use them as shown below, adapting the structure to fit each component.
Decimal Format
By default, the meter will display the value as a percentage. You can change the format of the value by passing a formatOptions
prop. This example is shown decimal format.
Currency Format
You can also change the currency format of the value by passing a formatOptions
prop. This example is shown currency format.