Gathering detailed insights and metrics for react-responsive-masonry
Gathering detailed insights and metrics for react-responsive-masonry
Gathering detailed insights and metrics for react-responsive-masonry
Gathering detailed insights and metrics for react-responsive-masonry
@types/react-responsive-masonry
TypeScript definitions for react-responsive-masonry
react-masonry-css
React Masonry component leveraging CSS to be fast and responsive
react-masonry-component2
react 的瀑布流组件库,支持 columns 布局、弹性布局、绝对定位布局三种方法实现
react-photo-gallery
Responsive Justified React Image Gallery Component
React responsive masonry component built with css flexbox
npm install react-responsive-masonry
Typescript
Module System
Node Version
NPM Version
98.9
Supply Chain
100
Quality
81.6
Maintenance
100
Vulnerability
100
License
JavaScript (98.74%)
Shell (1.26%)
Total Downloads
6,910,820
Last Day
10,535
Last Week
66,274
Last Month
276,060
Last Year
3,248,985
MIT License
427 Stars
143 Commits
43 Forks
1 Watchers
2 Branches
14 Contributors
Updated on May 12, 2025
Minified
Minified + Gzipped
Latest Version
2.7.1
Package Id
react-responsive-masonry@2.7.1
Unpacked Size
69.09 kB
Size
15.13 kB
File Count
12
NPM Version
11.0.0
Node Version
22.5.1
Published on
Jan 24, 2025
Cumulative downloads
Total Downloads
Last Day
-3.4%
10,535
Compared to previous day
Last Week
-0.2%
66,274
Compared to previous week
Last Month
-4.3%
276,060
Compared to previous month
Last Year
65.6%
3,248,985
Compared to previous year
30
A lightweight React responsive masonry component built with css flexbox.
You can download react-responsive-masonry
from the NPM registry via the npm
or
yarn
commands
1yarn add react-responsive-masonry 2npm install react-responsive-masonry --save
If you don't use package manager and you want to include react-responsive-masonry
directly in your html, you could get it from the UNPKG CDN
1https://unpkg.com/react-responsive-masonry/umd/react-responsive-masonry.js
See Demo page
If you want the number of columns change by resizing the window, you need to wrap the Masonry
component by the ResponsiveMasonry
component.
Otherwise, you only need to use the Masonry
component.
1import React from "react" 2import Masonry, {ResponsiveMasonry} from "react-responsive-masonry" 3 4// The number of columns and the gutter change by resizing the window 5class MyWrapper extends React.Component { 6 render() { 7 return ( 8 <ResponsiveMasonry 9 columnsCountBreakPoints={{350: 1, 750: 2, 900: 3}} 10 gutterBreakpoints={{350: "12px", 750: "16px", 900: "24px"}} 11 > 12 <Masonry> 13 <ChildA /> 14 <ChildB /> 15 {/* Children */} 16 <ChildY /> 17 <ChildZ /> 18 </Masonry> 19 </ResponsiveMasonry> 20 ) 21 } 22} 23 24// The number of columns and the gutter don't change by resizing the window 25class MyWrapper extends Component { 26 render() { 27 return ( 28 <Masonry columnsCount={3}> 29 <ChildA /> 30 <ChildB /> 31 {/* Children */} 32 <ChildY /> 33 <ChildZ /> 34 </Masonry> 35 ) 36 } 37}
Name | PropType | Description | Default |
---|---|---|---|
columnsCount | Number | Injected by ResponsiveMasonry | 3 |
gutter | String | Margin surrounding each item e.g. "10px" or "1.5rem" | "0" |
containerTag | String | Tag name of the container element | "div" |
itemTag | String | Tag name of the item element | "div" |
itemStyle | Object | Style object applied to each item | {} |
sequential | Boolean | If true, items are placed in the order they are passed | false |
Name | PropType | Description | Default |
---|---|---|---|
columnsCountBreakPoints | Object | Keys are breakpoints in px, values are the columns number | {350: 1, 750: 2, 900: 3} |
gutterBreakpoints | Object | Keys are breakpoints in px, values are the gutter value in any valid CSS value for 'gap' |
npm test
).See CONTRIBUTING.md guidelines
See changelog
This project is licensed under the MIT License - see the LICENCE.md file for details
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 8/25 approved changesets -- score normalized to 3
Reason
2 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 2
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
103 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-05-12
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