Box

An abstract component on top of which most other Arc Design System components are built.

Box

Features

Provide a shorthand way to pass styles via props.
Compose new component and allow for overrides.
Sets some safe defaults for elements.

#Import

import { Box } from '@wpmedia/ads-layout'
interface BoxProps
PropsDescription
children
(optional)
ReactNode

Contents of the box

css
(optional)
StitchesCss<any>

Maps to the Stitches CSS prop.

id
(optional)
undefined | string

The element's unique identifier. See MDN.


#Usage

Box can be best thought of as a div with two primary features:
  • built on Stitches and can accept the css prop
  • resets box-sizing to border-box
When possible, we recommend using a Box as a primary building block for layouts.
Copyright 2021 Arc XP