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

@horacioh/gatsby-theme-instagram

v0.1.6

Published

- [Online demo](https://gatsby-theme-instagram.netlify.com/)

Readme

Gatsby Theme Instagram Source code

Grid With SimpleCard component Grid With ComplexCard component

What you get from this theme

  • Add Instagram posts to your Gatsby site
  • A set of UI Components to layout posts on every section.
  • A set of custom hooks to customize the data you render on your components

Installation

To use this theme in your Gatsby sites, follow these instructions:

  1. Install the theme
npm install --save @horacioh/gatsby-theme-instagram

or

yarn add @horacioh/gatsby-theme-instagram
  1. Add the theme to your gatsby-config.js:
module.exports = {
  plugins: ["@horacioh/gatsby-theme-instagram"],
}
  1. Start your site
gatsby develop

Usage

Theme options

| Key | Default value | Description | | ---------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | type | account | the type of data that will be queried. Possible values are account, hashtag & user-profile (user-profile is not supported yet). | | username | doraforscale | instagram username you want to pull data from | | hashtag | undefined | instagram hashtag you want to pull data from |

Example usage

All the options are pretty much similar to how you setup gatsby-source-instagram. This theme uses gatsby-source-instagram at its core to pull data from Instagram.

Public Scrapping for posts

If you intend to use the public scraping method then you need to pass the concerning username

// gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: "@horacioh/gatsby-theme-instagram",
      options: {
        type: `account` // optional. `account` is the default `type` value
        username: "doraforscale",
      },
    },
  ],
}
Hashtag scraping

If you want to source nodes from hashtags then you need the following:

// In your gatsby-config.js
plugins: [
  {
    resolve: `gatsby-source-instagram`,
    options: {
      type: `hashtag`,
      hashtag: `snowing`,
    },
  },
]

Exported components

Grid

Grid With SimpleCard component

This component let you render a grid of Instagrams posts. This component is useful when you want to render the recents posts for a specific account or hashtag.

This component uses internally the Container components from theme-ui, so the with of the component will depend on the Container size you have defined.

Grid's Props

| Props | Default value | Required | Description | | ---------- | -------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------- | | card | SimpleCard | false | The component that will be rendered for each Instagram post. |

Example usage in MDX

In any MDX file:

import { Grid } from "@horacioh/gatsby-theme-instagram"

# Look at my photos!

<Grid />
Example usage in React components

In any React component:

import React from "react"
import { Grid } from "@horacioh/gatsby-theme-instagram"

export default () => (
  <div>
    <Grid />
  </div>
)
Example usage in React components using <ComplexCard />

Grid With ComplexCard component

import React from "react"
import { Grid, ComplexCard } from "@horacioh/gatsby-theme-instagram"

export default () => (
  <div>
    <Grid card={ComplexCard} />
  </div>
)
How to shadow the Grid component

If you want to use component shadowing with this component, create a file at the following path in your site:

src/@horacioh/gatsby-theme-instagram/components/Grid.js

checkout the Grid Implementation for more about how to shadow it.

The Grid component uses a custom Hook to get the data from GraphQL. In order to modify the queried data, you need to override the useGridQuery hook.

How to override the Grid Component Query

If you want to override the Grid query, you can shadow the custom hook used to fetch data to Instagram:

src/@horacioh/gatsby-theme-instagram/hooks/useGridQuery.js

checkout the useGridQuery Implementation for more about how to shadow it.

SimpleCard

SimpleCard component

This component let you render a simgle Instagram post, with a simple hover effect that shows the amount of likes and comments for each post.

SimpleCard's Props

| Props | Default value | Required | Description | | ---------- | -------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------- | | id | | false | The Instagram Post ID | | likes | | false | The Instagram Post number of likes | | comments | | false | The Instagram Post number of comments | | localFile| | true | The Instagram Post localFile Gatsby Image data |

How to shadow the SimpleCard component

If you want to use component shadowing with this component, create a file at the following path in your site:

src/@horacioh/gatsby-theme-instagram/components/SimpleCard.js

ComplexCard

ComplexCard component

This component let you render a simgle Instagram post, with a simple hover effect that shows the amount of likes and comments for each post.

ComplexCard's Props

| Props | Default value | Required | Description | | ---------- | -------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------- | | id | | false | The Instagram Post ID | | likes | | false | The Instagram Post number of likes | | comments | | false | The Instagram Post number of comments | | username | | true | The Instagram Post username's owner | | localFile| | true | The Instagram Post localFile Gatsby Image data |

How to shadow the ComplexCard component

If you want to use component shadowing with this component, create a file at the following path in your site:

src/@horacioh/gatsby-theme-instagram/components/ComplexCard.js

Issues & Contributions

Please, feel free to file issues or send me a tweet or an email for any assistance, help or feature requests!