Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
react-grid-system
Advanced tools
A pure JS bootstrap-like responsive grid system for React.
npm install react-grid-system --save
Three components are provided for creating responsive grids: Container
, Row
, and Col
.
An example on how to use these:
<Container>
<Row>
<Col xs={12} md={8}>xs=12 md=8</Col>
<Col xs={6} md={4}>xs=6 md=4</Col>
</Row>
</Container>
Three components are provided for creating responsive grids: Visible
and Hidden
.
An example on how to use these:
<Visible xs sm><div>Visible on extra small and small</div></Visible>
<Visible md lg><div>Visible on medium and large</div></Visible>
Live examples and documentation can be found at the GitHub pages: https://zoover.github.io/react-grid-system/
The following child context types can be provided to the grid components, to alter their responsive behavior:
Context Type | Default Value | Description |
---|---|---|
phone | false | When set to true , a default viewport width of 375 pixels will be used, in case the viewport width cannot be determined by using the window object. This is useful for server-side rendering. |
tablet | false | When set to true , a default viewport width of 768 pixels will be used, in case the viewport width cannot be determined by using the window object. This is useful for server-side rendering. |
breakpoints | [768, 992, 1200] | The breakpoints (minimum width) of devices in class sm , md , and lg . The default values are based on the Bootstrap 3 breakpoints. |
containerWidths | [750, 970, 1170] | The container widths in pixels of devices in class sm , md , and lg . The default values are based on the Bootstrap 3 container widths. |
For more information on using the user-agent to determine server-side whether a device is a phone or tablet, see for example https://github.com/hgoebl/mobile-detect.js.
For more information about context in React, see https://facebook.github.io/react/docs/context.html.
FAQs
A powerful Bootstrap-like responsive grid system for React.
The npm package react-grid-system receives a total of 25,405 weekly downloads. As such, react-grid-system popularity was classified as popular.
We found that react-grid-system demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.