Box

Box

import Box from "@kiwicom/orbit-components/lib/Box";
<Box>Hello World!</Box>

Props

NameTypeDefaultDescription
asstring"div"Render as element.
classNamestringThe optional className of Box.
childrenReact.NodeThe children of the Box.
dataTeststringOptional prop for testing purposes.
idstringSet id for Box
displayenumThe display of the Box
paddingspacingObject | spacingTokenThe padding of the Box
marginspacingObject | spacingTokenThe margin of the Box
wrapenumThe flex-wrap of the Box
shrinknumberThe flex-shrink of the Box
grownumberThe flex-grow of the Box
alignenumThe align-items of the Box
justifyenumThe justify-content of the Box
directionenumThe flex-direction of the Box
widthenumThe width of the Box
minWidthstringThe min-width of the Box
maxWidthstringThe max-width of the Box
heightenumThe height of the Box
maxHeightstringThe max-height of the Box
positionpositionThe position of the Box
leftstringThe left of the Box
zIndexnumberThe z-index of the Box
topstringThe top of the Box
rightstringThe right of the Box
bottomstringThe bottom of the Box
textAligntextAlignThe text-align of the Box
elevationelevationThe box-shadow of the Box
colorstringThe color of the Box
backgroundstringThe background of the Box
borderRadiusborderRadiusThe border-radius of the Box
overflowoverflowThe overflow of the Box
largeDesktopMediaQueriesObject for setting up properties for the largeDesktop viewport.
desktopMediaQueriesObject for setting up properties for the desktop viewport.
tabletMediaQueriesObject for setting up properties for the tablet viewport.
largeMobileMediaQueriesObject for setting up properties for the largeMobile viewport.
mediumMobileMediaQueriesObject for setting up properties for the mediumMobile viewport.

Media Queries

NameTypeDefaultDescription
paddingspacingObject | spacingTokenThe padding of the Box
marginspacingObject | spacingTokenThe margin of the Box
wrapenumThe flex-wrap of the Box
shrinknumberThe flex-shrink of the Box
grownumberThe flex-grow of the Box
alignenumThe align-items of the Box
justifyenumThe justify-content of the Box
directionenumThe flex-direction of the Box
widthenumThe width of the Box
maxWidthstringThe max-width of the Box
heightenumThe height of the Box
maxHeightstringThe max-height of the Box
positionpositionThe position of the Box
leftstringThe left of the Box
topstringThe top of the Box
rightstringThe right of the Box
bottomstringThe bottom of the Box
textAligntextAlignThe text-align of the Box
elevationelevationThe box-shadow of the Box
colorstringThe color of the Box
backgroundstringThe background of the Box
borderRadiusborderRadiusThe border-radius of the Box
overflowoverflowThe overflow of the Box

enum

displayjustifydirectionalignwrapwidthheight
"none""start""row""start""nowrap""full""full"
"flex""end""column""end""wrap""auto""auto"
"inline-flex""center""row-reverse""center"stringstring
"block""between""column-reverse""stretch"
"inline""around"
"inline-block"
"list-item"

position

position
"relative"
"absolute"
"fixed"

textAlign

textAlign
"start"
"end"
"left"
"center"
"right"

borderRadius

borderRadius
"small"
"normal"
"large"
"circle"

overflow

overflow
"auto"
"hidden"
"scroll"
"visible"

elevation

elevation
"action"
"fixed"
"overlay"
"raised"

spacingObject

keyvalue
"top"spacingToken
"right"spacingToken
"left"spacingToken
"bottom"spacingToken

spacingToken

spacingToken
"none"
"XXXSmall"
"XXSmall"
"XSmall"
"small"
"medium"
"large"
"XLarge"
"XXLarge"
"XXXLarge"