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-native-json-grid-list

v1.3.0

Published

This library will help you create impressive grid lists like these.

Readme

React Native JSON Grid List

This library will help you create impressive grid lists like these.

| List 1 | List 2 | | -------------------------- | -------------------------- | | | |

| List 3 | List 4 | | -------------------------- | -------------------------- | | | |

Getting started

Two main components are exported from this library: FlatGrid and GridItem. The most common use case is just using the first one, you won't need to use GridItem unless you want to show a grid outside of a list.

Many grid templates are already created so you won't have to make your owns if you are comfortable with the ones which are included.

Installing

You can install the package via npm or yarn.

npm install -S react-native-json-grid-list

or

yarn add react-native-json-grid-list

Usage

Usage (FlatGrid)

Import the FlatGrid component.

import FlatGrid, {LAYOUTS} from 'react-native-json-grid-list';

Now let's define what will be the content of our items. In this case, we just want a random photo from Unspash.

const ITEM_CONTENT = {
  photo: {
    uri: 'https://source.unsplash.com/random',
  },
};

Render our grid list.

<FlatGrid
  data={[
    {
      layout: 'layout-1',
      items: {
        'item-1': ITEM_CONTENT,
        'item-2': ITEM_CONTENT,
        'item-3': ITEM_CONTENT,
        'item-4': ITEM_CONTENT,
      },
    },
  ]}
  layouts={LAYOUTS}
  rowSeparator={8}
  paddingHorizontal={8}
  showsVerticalScrollIndicator={false}
/>
Properties

| Property | Type | Default value |  Description | | ----------------- | ---------------------------------------------- | ------------------------------------- | ---------------------- | | rowSeparator | number |   | Separator between rows | | paddingHorizontal | number |   | Padding horizontal | | layouts | Layouts | LAYOUTS | Layout definition | | data | ItemType[] |   | Items |

How to create your own layouts

Just the same way as you would nest components to get the layout you want, you can create your own grid layouts writing it in JSON format following some rules.

We got three layout types:

  1. Rows:
{
  "id": "row-1",
  "type": "row",
  "flex": 2,
  "layouts": [
    // ...more rows, columns or items
  ]
}
  1. Columns:
// You can omit flex attribute if it's equal to 1
{
  "id": "col-1",
  "type": "column",
  // "flex": 1,
  "layouts": [
    // ...more rows, columns or items
  ]
}
  1. Items:
// You can omit flex attribute if it's equal to 1
{
  "id": "item-1",
  // "flex": 1,

  // add an overlay
  "overlay": {
    "color": "#f00",
    "opacity": .6
  }
}

Layout examples

// Note that you can omit flex when it's equal to 1
{
  "spacing": 8,
  "height": 350,
  "layouts": [
    {
      "id": "column-1",
      "type": "column",
      "layouts": [
        {
          "id": "item-1",
          "flex": 2,
        },
        {
          "id": "item-2",
          // "flex": 1
        },
      ],
    },
    {
      "id": "item-3"
      // "flex": 1
    },
  ]
}