
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
react-holy-grail-layout
Advanced tools
React components to create a Holy Grail Layout, with styled-components and styled-system
yarn add react-holy-grail-layout
Example
import React from 'react'
import {
Container,
Header,
Body,
Content,
Aside,
Footer
} from 'react-holy-grail-layout'
export default () => (
<Container>
<Header bg="lightgreen" p={2}>
Header
</Header>
<Body>
<Content bg="lightblue" p={2}>
Content
</Content>
<Aside bg="pink" left primary p={2}>
Left
</Aside>
<Aside bg="orange" right p={2}>
Right
</Aside>
</Body>
<Footer bg="yellow" p={2}>
Footer
</Footer>
</Container>
)
You can use the styled-components theme provider to configure breakpoints and space.
import React from 'react'
import { ThemeProvider } from 'styled-components'
import {
Container,
Header,
Body,
Content,
Aside,
Footer
} from 'react-holy-grail-layout'
export default () => (
<ThemeProvider
theme={{
breakpoints: ['50em', '70em', '90em'],
space: [0, 14, 28, 64, 132]
}}
>
<Container>
<Header bg="lightgreen" p={2}>
Header
</Header>
<Body>
<Content bg="lightblue" p={2}>
Content
</Content>
<Aside bg="pink" left primary p={2}>
Left
</Aside>
<Aside bg="orange" right p={2}>
Right
</Aside>
</Body>
<Footer bg="yellow" p={2}>
Footer
</Footer>
</Container>
</ThemeProvider>
)
Use this pattern if you want to extend the styling of the Layout components:
import * as Layout from 'react-holy-grail-layout'
const Container = Layout.Container.extend`
max-width: 1280px;
`
const Header = Layout.Header.extend`
border-radius: 24px;
`
I love this pattern:
const Header = Layout.Header.extend.attrs({ p: 2, bg: 'lightgreen' })``
Cheers!
FAQs
readme.md
The npm package react-holy-grail-layout receives a total of 0 weekly downloads. As such, react-holy-grail-layout popularity was classified as not popular.
We found that react-holy-grail-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
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.