npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-dashboard-meter

v0.0.919

Published

UI component gauge meter, allowing for thorough customization.

Downloads

4

Readme

React Dashboard Meter

A simple to use, highly customizable gauge meter UI component

Installation

   npm i @jason1642/react-dashboard-meter

Usage

   import {GaugeMeter} from '@jason1642/react-dashboard-meter'
   // IMPORTANT - The minimum width of this component is 150px, you can change it by using the containerStyles prop 
const MyComponent: React.FunctionComponent<IMyComponentProps> = ({ value }) => {
   return(
       <div> 
       <GaugeMeter 
       containerStyles={{
           minWidth: '250px'
       }}
           value={value || 33}
           titleOptions={{
               appendedText: 'km/h',
               toFixedAmount: 0
           }}
           progressBarOptions={{
               fillerTriColors:['#97c4fb', '#5fa7ff', '#60a5fa']
           }}
           range={[0, 40]}
       />
       </div>
   )}

API

Name | type | Default | Description --- | --- | --- | --- value (required) | number | undefined | A number that will calculate the percentage of the progress bar that is filled. As well as provide context to the title label. range | [number, number] | number | [0, 100] | Tuple array or number that will be used to calculate the percentage of the progress bar that should be filled using the value prop. If a single number is provided, the range will be assumed to be 0 - range. You can provide any duo set of numbers as long as the first item in the tuple is smaller than the second. progressBarOptions | object | { fillerTriColors: ["green", "yellow", "red"], emptyAreaColor: "#bcbcbc" } | Change the colors of the progress bars filler and empty areas. You can add three colors to get a linear gradient effect on the filler tri colors prop. Options: fillerTriColors: [string, string, string?] \| string, emptyAreaColor: string innerAreaColor | string | 'white' | Change the color of the area that the progress bar covers. containerStyles | object | {} | Styles to pass along to the container of the component. You can change the default min-width value here. innerAreaSize | number | 86 | Change percentage amount that the inner area semi circle takes up, if the entire semi circle including the progress bar is 100%. titleOptions | object | {styles: {color: 'black'}, verticalPosition: 'center' } | Change the appearance of the title label inside the inner semi circle area. toFixedAmount changes the amount of numbers after the decimal point in the titles value, default 0. Options: {styles:{fontSize: string, color: string, marginBottom: string,fontFamily: string, marginTop: string}, toFixedAmount: number, reactNode: React.ReactElement, appendedText: string, verticalPOsition: string} labelOptions | object | {size: "default", appendedText: false, labelValueToFixed: 0,labalPosition: 'inward'} | Styles to pass along to the container of the component. You can change the default min-width value here. Options: {size: 'small'\|'default'\|'large', appendedTest: string, labelValueToFixed: 0\|1\|2\|3, labelPosition: 'bottom'\|'center'\|'top', numberOfLables: 3\|5 }