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"deprecated (use "50")
"normal"deprecated (use "100")
"large"deprecated (use "150")
"circle"deprecated (use "full")
"full"
"50"
"100"
"150"
"300"
"400"

overflow

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

elevation

elevation
"action"deprecated (use "level1")
"fixed"
"fixedReverse"
"overlay"deprecated (use "level4")
"raised"deprecated (use "level3")
"raisedReverse"deprecated (use "level3Reverse")
"level1"
"level2"
"level3"
"level3Reverse"
"level4"

spacingObject

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

spacingToken

spacingToken
"none"
"XXXSmall" - deprecated (use "50")
"XXSmall" - deprecated (use "100")
"XSmall" - deprecated (use "200")
"small" - deprecated (use "300")
"medium" - deprecated (use "400")
"large" - deprecated (use "600")
"XLarge" - deprecated (use "800")
"XXLarge" - deprecated (use "1000")
"50"
"100"
"150"
"200"
"300"
"400"
"500"
"600"
"800"
"1000"
"1200"
"1600"