Gathering detailed insights and metrics for react-masonry-layout
Gathering detailed insights and metrics for react-masonry-layout
Gathering detailed insights and metrics for react-masonry-layout
Gathering detailed insights and metrics for react-masonry-layout
react-layout-masonry
Responsive masonry layout for React
@bedrock-layout/masonry-grid
bedrock-layout masonry-grid
@lifeondesk/react-masonry-layout
Flexible and easy-to-use React library for creating responsive Masonry layouts with customizable brick sizes and responsive behavior.
@egjs/react-infinitegrid
A React component that can arrange items infinitely according to the type of grids
npm install react-masonry-layout
Typescript
Module System
Node Version
NPM Version
JavaScript (96.92%)
HTML (2.64%)
CSS (0.45%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
83 Stars
61 Commits
7 Forks
3 Watchers
2 Branches
1 Contributors
Updated on Oct 02, 2023
Latest Version
0.4.0
Package Id
react-masonry-layout@0.4.0
Unpacked Size
430.08 kB
Size
124.78 kB
File Count
36
NPM Version
6.2.0
Node Version
10.9.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
1
Masonry Layout base on bricks.js with React. It comes with infinite scroll feature too !
1$ npm install react-masonry-layout
1import React from 'react' 2import MasonryLayout from 'react-masonry-layout' 3 4class Masonry extends React.Component { 5 6 state = { 7 perPage: 10, 8 items: Array(20).fill() 9 } 10 11 loadItems = () => { 12 this.setState({ 13 items: this.state.items.concat(Array(this.state.perPage).fill()) 14 }); 15 } 16 17 render() { 18 return ( 19 <div className="App"> 20 21 <MasonryLayout 22 id="masonry-layout" 23 infiniteScroll={this.loadItems}> 24 25 {this.state.items.map((v, i) => { 26 let height = i % 2 === 0 ? 200 : 100; 27 return ( 28 <div 29 key={i} 30 style={{ 31 width: '100px', 32 height: `${height}px`, 33 lineHeight: `${height}px`, 34 color: 'white', 35 fontSize: '32px', 36 display: 'block', 37 background: 'rgba(0,0,0,0.7)' 38 }}> 39 {i} 40 </div> 41 )} 42 )} 43 44 </MasonryLayout> 45 </div> 46 ); 47 } 48}
props | type | default | description |
---|---|---|---|
id | string | null | required |
packed | string | data-packed | optional, see Bricks.js |
sizes | array | [ { columns: 2, gutter: 20 }, { mq: '768px', columns: 3, gutter: 20 }, { mq: '1024px', columns: 6, gutter: 20 } ] | optional, see Bricks.js |
position | boolean | false | optional, see Bricks.js |
className | string | '' | optional, the css classname you want to use |
style | object | {} | optional, the inline style you want to use |
infiniteScroll | function | () => {} | optional, the function that used to load more data |
infiniteScrollContainer | string | window | optional, by default, it will listen to the window 's scroll event. If you want to listen to some div 's scroll event, please set the container's id to it |
infiniteScrollDisabled | boolean | false | optional, if you don't want to trigger infiniteScroll , set it to false |
infiniteScrollLoading | boolean | false | optional, when you are loading data, please set it to true , then the infiniteScroll will not trigger |
infiniteScrollEnd | boolean | false | optional, when no more data, please set it to true , then the infiniteScroll will not trigger |
infiniteScrollDistance | number | 200 | optional, the distance to trigger infiniteScroll |
infiniteScrollSpinner | element | <div>this is a loader</div> | optional, override it if you want to custom the loading spinner |
infiniteScrollEndIndicator | element | <div>no more data</div> | optional, override it if you want to custom the no more data indicator |
getBricksInstance
return the instance of bricks.js
.1class C extends Component { 2 onClick() { 3 const bricksInstance = this.instance.getBricksInstance(); 4 // do stuffs 5 } 6 render = () => <MasonryLayout ref={instance => this.instance = instance}> 7}
MIT.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no SAST tool detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
157 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More