Socket
Book a DemoInstallSign in
Socket

react-image-grid-gallery

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-image-grid-gallery

A simple image gallery component for displaying a grid of images in React apps

0.8.0
Source
npmnpm
Version published
Weekly downloads
234
-37.6%
Maintainers
1
Weekly downloads
 
Created
Source

It's here! A simple, easy-to-use, and responsive image gallery component for displaying a grid of images in React apps.

Installation

Using npm:

npm install react-image-grid-gallery

Using yarn:

yarn add react-image-grid-gallery

Usage

import ImageGallery from "react-image-grid-gallery";

const imagesArray = [
  {
    alt: "Image1's alt text",
    caption: "Image1's description",
    src: "http://example.com/image1.jpg",
  },
  {
    alt: "Image2's alt text",
    caption: "Image2's description",
    src: "http://example.com/image2.png",
  },
  {
    alt: "Image3's alt text",
    caption: "Image3's description",
    src: "http://example.com/image3.webp",
  },
];

function App() {
  return <ImageGallery imgArray={imagesArray} />;
}

Required Props

imgArray

The imgArray props is an array of objects containing the following properties:

  • alt: The image's alternative text. This property is required.
  • caption: A description of the image. This property is optional.
  • src: The URL of the image. This property is required.

Keywords

react

FAQs

Package last updated on 30 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.