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-horizontal-scroll-grid

v0.1.4

Published

<h1 align="center">

Downloads

4

Readme

npm version license

<HScrollGrid gridWidth={400} gridHeight={100} cardWidth={100} backgroundColor="antiquewhite">
    <li>Test</li>
    <li>Test</li>
    <li>Test</li>
    <li>Test</li>
    <li>Test</li>
</HScrollGrid>

Demo

Alt Text

Changelog

|Version | Compatibility| |------------|--------------| |0.1.3 | React 16.3+ |

Technical Documentation

Installing

npm install react-horizontal-scroll-grid

Exports

The HScrollGrid component can exported as follows:

import HScrollGrid from "react-horizontal-scroll-grid"

HScrollGrid

A HScrollGrid is a simple UI Wrapper Component which helps you to display in your <li> items in horizontal scroll view. It is completely css based implementation. The count of child elements is directly computed at componentDidMount stage and set using css variables.

HScrollGrid Props

|Prop Name | Required |Default value | Description| |------------|--------------|----------|---------| |gridWidth | Yes| null | Should be passed as number |gridHeight | Yes | null| Should be passed as number * |cardWidth| Yes | null| Should be passed as number |backgroundColor |No| transparent| Should be passed String

NOTE

  • gridWidth, gridHeight,cardWidth should be passed in as number since they are used as pixels in css.
  • Please be aware that by providing the value of gridHeight you are also setting the height of each child element to gridHeight i.e. Grid's gridHeight = card's gridHeight

Usage

import React from 'react';
import HScrollGrid from 'react-horizontal-scroll-grid';

const Example = () => {
    const keys = [1, 2, 3, 4, 5, 6];
    const cards = keys.map(elem => <li key={elem}> Test </li>);
    return (
        <>
            <HScrollGrid
                gridWidth={400}
                gridHeight={100}
                cardWidth={100}
                backgroundColor="antiquewhite"
            >
                {cards}
            </HScrollGrid>

            <HScrollGrid
                gridWidth={700}
                gridHeight={100}
                cardWidth={200}
                backgroundColor="antiquewhite"
            >
                {cards}
            </HScrollGrid>

            <HScrollGrid
                gridWidth={1000}
                gridHeight={300}
                cardWidth={400}
                backgroundColor="#ecf2a7"
            >
                {cards}
            </HScrollGrid>
        </>
    )
};

export default Example;

Built with

Features

  • Provides a UI wrapper to wrap child elements in horizontal scrolling view.
  • Dynamic child element count computation using css variables.
  • Easy-to-use

You can reach out 😊😊

Feel free to contact me about the problems. I will try to help as much as I can 😉

Linkedin Badge Mail Badge Twitter Badge Github Badge

License

This project is licensed under the MIT License - see the LICENSE file for details