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
npm install react-responsive-masonry
97.8
Supply Chain
100
Quality
83.9
Maintenance
100
Vulnerability
100
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
382 Stars
129 Commits
37 Forks
1 Watching
2 Branches
10 Contributors
Updated on 24 Nov 2024
JavaScript (98.64%)
Shell (1.36%)
Cumulative downloads
Total Downloads
Last day
3.5%
11,812
Compared to previous day
Last week
6.4%
63,454
Compared to previous week
Last month
3.8%
264,937
Compared to previous month
Last year
115.9%
2,768,349
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 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 > 11 <Masonry> 12 <ChildA /> 13 <ChildB /> 14 {/* Children */} 15 <ChildY /> 16 <ChildZ /> 17 </Masonry> 18 </ResponsiveMasonry> 19 ) 20 } 21} 22 23// The number of columns don't change by resizing the window 24class MyWrapper extends Component { 25 render() { 26 return ( 27 <Masonry columnsCount={3}> 28 <ChildA /> 29 <ChildB /> 30 {/* Children */} 31 <ChildY /> 32 <ChildZ /> 33 </Masonry> 34 ) 35 } 36}
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} |
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
7 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 6
Reason
Found 6/17 approved changesets -- score normalized to 3
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
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
95 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
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@types/react-responsive-masonry
TypeScript definitions for react-responsive-masonry
@wowblvck/react-responsive-masonry
React responsive masonry component built with css flexbox
react-masonry-css
React Masonry component leveraging CSS to be fast and responsive
react-photo-album
Responsive photo gallery component for React