EDS4 logo
@eds/box
v4.0.10

Box

A primitive layout component.

The <Box /> is a primitive layout component that is heavily used to build other components, but can also be used to create custom layouts and components in your app.

By default, it renders a <div>. You can render it with a different HTML element tag by using the as prop:

Apply styles like padding, margin, border radius, background color and more, by using available props. Here's a small example:

The <Box /> component supports the responsive prop syntax on most props (for a full list see props). Try resizing your viewport to see the effects in the examples below.

Use the breakpoint names to define a value at that minimum width:

If you want to skip over a breakpoint, you can do so by excluding it: