Box

Specification

Box is a primitive component that distributes alignment and spacing.
Box has no control over elements' composition. Use Composition instead.

Props

Box supports all Prop aliases, except those specific to CSS Grid.
Prop name
Type
Description
flex
boolean
Display a box as flex.
inline
boolean
Uses inline display.

Example

1
import React from 'react'
2
import { Box } from 'atomic-layout'
3
4
export const Header = ({ children }) => (
5
<Box as="header" padding={10} paddingMd={20}>
6
{children}
7
</Box>
8
)
Copied!
Last modified 1yr ago
Copy link