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-query-meter

v1.0.6

Published

A query result visual meter.

Downloads

5

Readme

react-query-meter

A query result visual meter.

NPM JavaScript Style Guide

meter

Live Demo here

Install

npm install --save react-query-meter

Usage

<QueryMeter
    totalHits={totalHits}
    maxHits={maxHits}
    width={200}
    thickness={25}
    slices={6}
    sliceGap={2}
    duration={1000}
    transitionTiming="cubic-bezier(.17,.67,.83,.67)"
    backgroundColor="#fff"
    fillColor="linear-gradient(315deg, #fff000 0%, #ed008c 74%)"
    fillBackgroundColor="#eee"
    containerSpacing={20}
    strengthMode={true}
    showInfo={true}
    showPercentage={true}
    topText="Total Hits:&nbsp;"
    bottomText="Max Hits:&nbsp;"
    percentageStyle={{}}
    infoNumbersStyle={{}}
    infoTextStyle={{}}
/>

Props

| name | type | description | default value | |---|---|---|---| | totalHits | number | number of results | 0 | | maxHits | number | the maximum number of possible results | 0 | | width | number | the width of the meter (in pixels) | 200 | | thickness | number | the thickness of the meter (in pixels) | 25 | | slices | number | the number of meter slices | 6 | | sliceGap | number | the spacing between slices (in pixels) | 2 | | duration | number | the duration of the animation (in milliseconds) | 1000 | | transitionTiming | string | the the timing function for the animation details | "cubic-bezier(.17,.67,.83,.67)" | | backgroundColor | string | the background color for the meter's container | "#fff" | | fillColor | string | the color of the meter | "linear-gradient(315deg, #fff000 0%, #ed008c 74%)" | | fillBackgroundColor | string | the background color of the meter | "#eee" | | containerSpacing | number | the space (in pixels) between the container and the meter, this prop is allowed only when showPercentage is true, otherwise it is equal to 0 | 20 | | strengthMode | boolean | whether fewer results will be displayed as a stronger search query or not | true | | showInfo | boolean | whether to display the maxHits and totalHits information in the center of the meter or not | true | | showPercentage | boolean | whether to display the percentage calculation in the outer part of the meter or not | true | | topText | string | the label for the total hits information | "Total Hits: " | | bottomText | string | the label for the max hits information | "Max Hits: " |

License

© MIT