Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
atomic-layout
Advanced tools
A single component to distribute the spacial relation in your layouts using CSS Grid
Atomic layout is an implementational paradigm that delegates distribution of spacial relation between composites to the dedicated layer.
This library is a representative of that paradigm. It's a single React component to declare spacial relation between any composites. Inspired by and encourages Atomic design.
Now, when you compose molecules out of atoms you add spacial properties to the atoms directly. Not only that makes you write more CSS, that contradicts the core principle of an atom being simple, reusable, predictable.
Atomic layout introduces a higher layer that distributes spacial relation between any composites (atoms, molecules, organisms) without mutating their behavior.
It's a flexible abstraction above CSS Grid written in React, powered by styled-components.
You're probably thinking it's some sort of experimental hack. Well, in fact Atomic layout is built on technologies which have been around for years. It's stable, it's standardized, it's production-ready.
import React from 'react'
import { Layout } from 'atomic-layout'
// declare template areas
const templateMobile = `
'thumbnail'
'heading'
'subheading'
`
// don't forget about responsive
const templateDesktop = `
'thumbnail heading'
'thumbnail subheading'
`
const Card = () => (
<Layout template={templateMobile} templateSm={templateDesktop}>
{/* Get React components based on your grid areas */}
{({ Thumbnail, Heading, Subheading }) => (
<React.Fragment>
<Thumbnail>
<img src="foo.png" />
</Thumbnail>
<Heading>
<h4>Juicy fruits</h4>
</Heading>
<Subheading>
<p>Healthy mind in a healthy body.</p>
</Subheading>
</React.Fragment>
)}
</Layout>
)
export default Card
Please see the Official documentation.
See the Support table.
FAQs
Physical representation of layout composition to create declarative, responsive layouts in React.
The npm package atomic-layout receives a total of 702 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.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.