Skip to main content
Acts as a container for other components. Can be optionally styled to render a visible element (e.g. a colored background). Similar to a <div> in HTML.
The Box component will typically have a layout prop provided so the Box can act as a layout container for its children (i.e. the components inside the box). Often a Box doesn’t render anything itself, it just specifies the layout that gets inherited by its children. Nesting boxes inside boxes can be a productive way to break down your design into manageable units. See the section Layout API for more details.

Props

Properties specific to the <Box> component. Properties available to all VCS components, including this one.

style prop

The style prop accepts an object that can have the following values set.
Valid color format options:
  • Hex color codes
  • RGB or RGBA syntax
  • Standard CSS color names (e.g. ‘blue’)