Box

inprogress

    Overview

    The Box component is a wrapper component that can be used to wrap any content. It can be used to apply padding the content. It returns a div by default, but can be changed to any other HTML tag.

    When to use

    t.b.d.

    When to consider an alternative

    t.b.d.


    Component

    Default

    The default has no padding.

    Spacing

    Use one of the predefined spacing tokens Box.Spacer.space2xl to apply padding either equally or to each side of the Box.

    With Tag

    Set the tag property to apply a semantic tag to the Box component.

    <Box tag="article" /> returns <article></article>


    Properties

    Default

    PropertyTypeRequiredDefaultDescription
    utilClassNamesStringfalse-
    childrenNodefalse-
    boxRefShape
    { "current": "Any" }
    false-
    tagStringfalsediv
    paddingEnumfalse-Exported as `Box.Spacer.space` etc.
    paddingLeftEnumfalse-Exported as `Box.Spacer.space` etc.
    paddingRightEnumfalse-Exported as `Box.Spacer.space` etc.
    paddingTopEnumfalse-Exported as `Box.Spacer.space` etc.
    paddingBottomEnumfalse-Exported as `Box.Spacer.space` etc.