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 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-goodgraphics

v0.0.3

Published

A set of components for working with SVGs in React.

Readme

react-goodgraphics

npm version

A set of components for working with SVGs in React. This library is a very thin wrapper over native SVG functionality. This project is part of goodgraphics.xyz

Usage

Install

npm i react-goodgraphics

Use

import React from "react";
import { SVG, Circle } from "react-goodgraphics";

const FooBar = () => {
  return (
    <SVG
      height={400}
      width={400}
      style={{ background: "#1b1b1b", fill: "white" }}
    >
      <Circle x={200} y={200} radius={100} />
    </SVG>
  );
};

export default FooBar;

API

NOTE: Detailed are props that we map to the native SVG markup. i.e. the x and y props on Circle get mapped to cx and cy. All valid html attributes are accepted and passed to the components.

SVG

  • @prop {Number} height Height of the svg. Defaults to 200.
  • @prop {Number} width Width of the svg. Defaults to 200.

Circle

  • @prop {String | Number} x The x position for the shape.
  • @prop {String | Number} y The y position for the shape.
  • @prop {String | Number} radius The radius of the shape.

Ellipse

  • @prop {String | Number} x The x position for the shape.
  • @prop {String | Number} y The y position for the shape.
  • @prop {String | Number} width The width of the shape.
  • @prop {String | Number} height The height of the shape.

Rect

  • @prop {String | Number} x The x position for the shape.
  • @prop {String | Number} y The y position for the shape.
  • @prop {String | Number} width The width of the shape.
  • @prop {String | Number} height The height of the shape.

Square

  • @prop {String | Number} x The x position for the shape.
  • @prop {String | Number} y The y position for the shape.
  • @prop {String | Number} size The size of the square.

Line

  • @prop {String | Number} x1 The x position of the start of the line.
  • @prop {String | Number} y1 The y position of the start of the line.
  • @prop {String | Number} x2 The x position of the end of the line.
  • @prop {String | Number} y2 The y position of the end of the line.

Times

Runs the draw function x number of times.

  • @prop {Number} number The number of times to run the loop.
  • @prop {Function} draw The draw render prop function.

Grid

Draw items across a grid.

  • @prop {Function} draw The draw render prop function.
  • @prop {Number} columns The number of columns.
  • @prop {Number} rows The number of rows.
  • @prop {Number} height Height of the svg. Defaults to svg's height.
  • @prop {Number} width Width of the svg. Defaults to svg's width.
  • @prop {Number} margin Margin between the edges and the grid. Defaults to 0.