1.0.6 • Published 4 years ago

react-query-meter v1.0.6

Weekly downloads
33
License
-
Repository
github
Last release
4 years ago

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

nametypedescriptiondefault value
totalHitsnumbernumber of results0
maxHitsnumberthe maximum number of possible results0
widthnumberthe width of the meter (in pixels)200
thicknessnumberthe thickness of the meter (in pixels)25
slicesnumberthe number of meter slices6
sliceGapnumberthe spacing between slices (in pixels)2
durationnumberthe duration of the animation (in milliseconds)1000
transitionTimingstringthe the timing function for the animation details"cubic-bezier(.17,.67,.83,.67)"
backgroundColorstringthe background color for the meter's container"#fff"
fillColorstringthe color of the meter"linear-gradient(315deg, #fff000 0%, #ed008c 74%)"
fillBackgroundColorstringthe background color of the meter"#eee"
containerSpacingnumberthe space (in pixels) between the container and the meter, this prop is allowed only when showPercentage is true, otherwise it is equal to 020
strengthModebooleanwhether fewer results will be displayed as a stronger search query or nottrue
showInfobooleanwhether to display the maxHits and totalHits information in the center of the meter or nottrue
showPercentagebooleanwhether to display the percentage calculation in the outer part of the meter or nottrue
topTextstringthe label for the total hits information"Total Hits: "
bottomTextstringthe label for the max hits information"Max Hits: "

License

© MIT

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago