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

@nassim99/react-native-gauge

v0.0.8

Published

an svg gauge package that works on react native cli and expo

Downloads

151

Readme

@Nassim99/React-Native-Gauge

Description

This is a small simple package to render gauge useing SVG, Main reason for creating this is that i needed a simple gauge to be implimented in expo project, the ones i found wasn't working on expo and some of them slows the app down.

Installation

yarn add @nassim99/react-native-gauge

or

npm install @nassim99/react-native-gauge

Usage

Import

import GaugeSVG from "@nassim99/react-native-gauge";

Fundamental Usage

const value = 40 // 40% of the gauge. min=0 max=100
    <GaugeSVG
      size={150}
      insideTextColor={'purple'}
      gaugeColor={'black'}
      gaugeValueColor={'blue'}
      gaugeStroke={3}
      gaugeValueStroke={3.5}
      value={value}
    >
        <View style={{
            justifyContent: 'center',
            alignItems: 'center',
            width: '100%',
            height: '100%',
        }}>
          <Text>{value}</Text>
        </View>
    </GaugeSVG>

Peer Dependencies

this library uses react-native-svg package you should install it in your project

yarn add react-native-svg

Configuration - Props

Required

| Property | Type | Default | Description | | -------- | :----: | :-------: | ----------------------------------- | | value | number | undefined | number of the value between 0 a 100 |

Customization (Optionals)

| Property | Type | Default | Description | | ---------------- | :----: | :-----: | ---------------------------------------------------------------------------------------------------------------------- | | gaugeColor | string | #ff0 | changes the color of the gauge | | gaugeValueColor | string | "#666" | change the color of the gauge value | | gaugeStroke | number | 2 | changes the gauge stroke | | gaugeValueStroke | number | 2.5 | changes the gauge value stroke | | insideTextColor | string | #999 | changes the color of the text in the center of the gauge, not applicable if gauge have children like the example above | | size | number | 150 | changes the width and height of the gauge |

Future Plans

  • [x] ~~LICENSE~~
  • [ ] Add animation
  • [ ] Add tests

Change Log

Author

Nassim Redwan, https://github.com/nassim99

License

@nassim/react-native-gauge is available under the MIT license. See the LICENSE file for more info.