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

retro-neon-grid-react

v1.0.7

Published

Dope retro neon grid - React Component

Downloads

8

Readme

retro-neon-grid-react

A hooks-based react component to take the hassle out of making a neon glowing grid for that sweet 80's experience.

Install

npm i retro-neon-grid-react

Usage

To be used within an existing react component :)

import React from 'react'
import Grid from 'retro-neon-grid-react'

function App () {
  return (
    <div>
      <Grid />
      <header>
        <h1>My sweet site</h1>
      </header>
    </div>
  )
}

export default App

grid covers the lower two thirds of the image, angled vertical lines get closer together as they near the highest horizontal line and all lines are purple in colour with faint outline

Details

The grid component creates a canvas with the id grid-canvas.

This canvas is currently hardcoded to be fixed to the full height and width of the viewport.

Customisation

The following shows the props you can provide the component to customise the grid and their default values.

| key | description | default value | |---|---|:-:| | lineWidth | Pixel width of all drawn lines. | 2 | | top | The top of the grid. Calculated out of 100 where 0 is the top of the page and 100 is the bottom.| 30 | | glow | Whether lines appear with a "glow" shadow. | true | | colour | Colour of the drawn lines. | '#aa00ff' | | angle | Angle at which vertical lines angle away from the center (getting progressively larger). Use 0 and all vertical lines will be completely vertical. Negative value will angle lines closer towards the bottom of the page. | 20 | | spacing | Distance between top point of neighbouring vertical lines. | 2 | | gap | Starting gap at top of horizontal lines. This is kept small at the top and gets progressively larger down the grid. | 0.3 | | linearY | Apply same gap between horizontal lines rather than progressively increasing | false | | position | CSS property applied to the canvas. | "fixed" | | zIndex | CSS property applied to the canvas. | -9999 |

Example of customised component:

import React from 'react'
import Grid from 'retro-neon-grid-react'

function App () {
  return (
    <div>
      <Grid 
        lineWidth={5}
        glow={false}
        colour='#3ff2d5' 
        angle={10} 
        top={50} 
      />
      <header>
        <h1>My sweet site</h1>
      </header>
    </div>
  )
}

export default App

grid covers the lower half of the image, vertical lines appear closer together and all lines are mint in colour