Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
atomic-layout
Advanced tools
Physical representation of layout composition to create declarative, responsive layouts in React.
Atomic Layout is a spatial distribution library for React. It uses CSS Grid to define layout areas and render them as React components. This pattern encourages separation of elements and spacing, preventing contextual implementations and boosting maintenance of layouts.
import React from 'react'
import { Composition } from 'atomic-layout'
// Define layout areas: visual representation
// of what composes a layout, detached from
// what components are actually rendered.
const areasMobile = `
thumbnail
header
footer
`
// Declare responsive changes of your areas.
// Operate in two dimensions, remove areas
// or introduce new ones.
const areasTablet = `
thumbnail header
thumbnail footer
`
const Card = ({ title, imageUrl, actions }) => (
<Composition areas={areasMobile} areasMd={areasTablet} gap={20}>
{/* Get React components based on provided areas */}
{({ Thumbnail, Header, Footer }) => (
<React.Fragment>
<Thumbnail>
{/* Render anything, including another Composition */}
<img src={imageUrl} alt={title} />
</Thumbnail>
{/* Preserve semantics with polymorphic prop */}
<Header as="h3">{title}</Header>
{/* Responsive props: just suffix with a breakpoint name */}
<Footer padding={10} paddingMd={20}>
{actions}
</Footer>
</React.Fragment>
)}
</Composition>
)
export default Card
npm install atomic-layout styled-components
Using something else than
styled-components
? See the full list of Atomic Layout implementations.
See the Official documentation.
There are some shortcuts to get you started:
FAQs
Physical representation of layout composition to create declarative, responsive layouts in React.
The npm package atomic-layout receives a total of 417 weekly downloads. As such, atomic-layout popularity was classified as not popular.
We found that atomic-layout demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.