Box

Ready

There are different ways to organise the content on the webpage to facilitate the user according to his nature of interaction with the content like forms, tables, lists etc. One of the best ways to organize the webpage is by using groups of related content, this can be achieved by using a dedicated Box component.

Specifications

Component design specifications
Component design specifications

Design tokens

Color

Component tokenElementCore tokenValue
backgroundColorContainercolor-white#ffffff
borderColorContainercolor-transparent#transparent
noneShadowDepthShadowColorShadowcolor-transparenttransparent
oneShadowDepthShadowColorShadow-#00000033
twoShadowDepthShadowColorShadow-#00000033

Border

Component tokenElementCore tokenValue
borderThicknessContainer borderborder-width-00
borderRadiusContainer borderborder-radius-medium0.25rem / 4px
borderStyleContainer borderborder-style-nonenone

Shadow

Component tokenElementCore tokenValue
noneShadowDepthShadowOffsetXContainer shadow-none
noneShadowDepthShadowOffsetYContainer shadow-none
noneShadowDepthShadowBlurContainer shadow-none
noneShadowDepthShadowSpreadContainer shadow-none
oneShadowDepthShadowOffsetXContainer shadow-0x
oneShadowDepthShadowOffsetYContainer shadow-3px
oneShadowDepthShadowBlurContainer shadow-6px
oneShadowDepthShadowSpreadContainer shadow-0px
twoShadowDepthShadowOffsetXContainer shadow-0x
twoShadowDepthShadowOffsetYContainer shadow-3px
twoShadowDepthShadowBlurContainer shadow-10px
twoShadowDepthShadowSpreadContainer shadow-0px

Width

In the cases of fillParent and fillContent the box is going to behave as a fluid container occupying the space the parent leaves for its children or adapting its size to the children it the box has. Instead of using a fluid approach, you can set a fixed size, choosing between small, medium and large properties.

PropertyValue
small48px
medium240px
large480px
fillParent-
fillContent-

Margin

marginvalue
xxsmall6px
xsmall16px
small24px
medium36px
large48px
xlarge64px
xxlarge100px

And also apply different values to each side of the component: top, bottom, left and right.

Padding

paddingvalue
xxsmall6px
xsmall16px
small24px
medium36px
large48px
xlarge64px
xxlarge100px

And also apply different values to each side of the component: top, bottom, left and right.