You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
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

1.0.2
Source
npmnpm
Version published
Weekly downloads
267
9.88%
Maintainers
1
Weekly downloads
 
Created
Source

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

npm NPM

Live Demo and Tutorial

Available at: https://codesweetly.com/react-image-grid-gallery

Installation

NPM:

npm install react-image-grid-gallery --save

Yarn:

yarn add react-image-grid-gallery

PNPM:

pnpm 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} columnWidth={230} gapSize={24} />;
}

Required Props

PropsTypeDefaultDescription
imgArrayarrayundefined

Required. An array of objects containing the following properties:

columnWidthnumber230

Optional. The minimum width of the gallery's columns.

gapSizenumber24

Optional. The gallery's gap size.

YouTube Demo

React Image Grid Gallery Demo

Keywords

react

FAQs

Package last updated on 01 Jun 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