Box

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.

warning
This component will be removed from Halstack Design System in the future. Please consider the new Container component as an alternative for your current use cases.

Specifications

Box design specifications
Box design specifications

Design tokens

Color

Component tokenElementCore tokenValue
backgroundColorContainercolor-white#ffffff
borderColorContainercolor-transparenttransparent
noneShadowDepthShadowColorShadowcolor-transparenttransparent
oneShadowDepthShadowColorShadowcolor-grey-300-a#00000033
twoShadowDepthShadowColorShadowcolor-grey-300-a#00000033

Border

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

Shadow

Component tokenElementCore tokenValue
noneShadowDepthShadowOffsetXContainer shadow--
noneShadowDepthShadowOffsetYContainer shadow--
noneShadowDepthShadowBlurContainer shadow--
noneShadowDepthShadowSpreadContainer shadow--
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.

WidthValue
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.