Socket
Book a DemoInstallSign in
Socket

react-staggered-grid

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-staggered-grid

This is a react component that positions and arranges your items in a staggered grid

1.0.6
Source
npmnpm
Version published
Weekly downloads
24
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

React Staggered Grid

This is a react component that positions and arranges your items in a staggered grid

Install

npm i react-staggered-grid

Usage

Here columns will be generated automatically according to fixed width of each item !

import {StaggeredDisplay, StaggeredGrid, StaggeredGridItem, StaggeredItemSpan} from "react-staggered-grid";

<StaggeredGrid
    display={StaggeredDisplay.Grid}
    items={items}
    render={(item: Item, index: number) => (
        <StaggeredGridItem index={index} key={index} style={{transition: "transform 0.3s ease"}}>
            <div style={{
                width: "300px",
                height: item.height + "px",
                background: "skyblue",
                textAlign: "center",
                lineHeight: item.height + "px",
                margin: "8px"
            }}>
                Item {index}
            </div>
        </StaggeredGridItem>
    )
    }
/>

FAQs

Package last updated on 12 May 2022

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.