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-win-grid

v1.0.2

Published

Windows 10 styled grid component for your react app

Downloads

10

Readme

react-win-grid

A lightweight and customisable Windows 10 Grid Component for ReactJS to give a native windows look to your web apps.

GitHub license GitHub forks GitHub stars GitHub issues

Demo

Table of contents

Changelog

  • @1.0.* - First stable version

Installation

npm install react-win-grid

Getting Started

import { WinGrid, WinItem } from 'react-win-grid';

OR

const { WinGrid, WinItem } = require('react-win-grid');

WinItem

This is a button component. Use this for individual clickable/hoverable items in your layout. This can be used inside of WinGrid or as a standalone component. Below is a list of props (optional) you can pass to the component.

| props | description | type | acceptable values | | ---------------- | -------------------------------------------------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------ | | backgroundColors | Colors that will be applied as gradient on background on mouse hover | Array of strings | All color values supported by CSS | | borderColors | Colors that will applied as gradient on borders on mouse hover | Array of strings | All color values supported by CSS | | borderWidth | Border thickness in pixels | Number | Any positive number | | className | HTML class attribute equivalent | String | - | | contentIsImage | This prop is recommended when the child is any image element. | Boolean | true \| false | | disabled | Disable the WinItem | Boolean | true \| false | | eventHandlers | Event Handlers for the component | Object | key should be valid React event names and value will be the event handler function | | onlyBackground | Don't apply hover effect on borders | Boolean | true \| false | | onlyBorders | Don't apply hover effect on background | Boolean | true \| false | | style | CSS styles for the component | Object | Valid css properties (camelCased) |

Note: Adding the contentIsImage prop to WinItem will not allow events to pass down to its children elements as this adds a layer on top of the image for hover effect to be visible. However, you can still set event handlers on the component itself by adding the eventHandlers prop. You can instead put image and non image in seperate WinItems

//The button will not receive click event
<WinItem contentIsImage>
	<img
		src='https://picsum.photos/1920/1080/'
		alt='imagesc'
		style={{ maxWidth: `100%` }}
	/>
	<button onClick={() => console.log('click')}> I am unclickable</button>
</WinItem>

WinGrid

This is a CSS grid component with the Windows10 grid hover effect. Use this layout to arrange and all the items inside this component should be either WinItem or HTML elements. If you want to pass your react component to this, wrap it inside WinItem. All the props mentioned below are optional

| props | description | type | acceptable values | | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | borderColors | Colors that will applied as gradient on borders on mouse hover | Array of strings | All color values supported by CSS | | borderWidth | Border thickness in pixels | Number | Any positive number | | className | HTML class attribute equivalent | String | - | | directions | directions parameter specified in cursor-nearby-elements package | Number | Positive integers | | eventHandlers | Event Handlers for the component | Object | key should be valid React event names and value will be the event handler function | | highlightRadius | This value is like factor which multiplies with the original spotlight radius aka offset resulting in smaller or bigger radius | Object | Valid css properties (camelCased) | | offsetPoints | offsetPoints parameter specified in cursor-nearby-elements package | Array of floats | Positive float values (Refer the package for default value) | | shouldSkipAngle | shouldSkipAngle parameter specified in cursor-nearby-elements package | Number | Positive integers | | style | CSS styles for the component | Object | Valid css properties (camelCased) |

💡 Tip: Use the offsetPoints and directions props to fine tune the performance of the WinGrid based on your layout

DEMO

Edit react-wingrid DEMO