Skip to main content
Layout components are used to separate layout responsibilities from content and interactivity. This is the separation of concerns that makes your dashboard maintainable and easy to reason about, and understanding these principles is key to building your interfaces effectively.

Box

Box is the most fundamental layout component.
Box is used to:
  • Provide spacing to child elements.
  • Impose sizing constraints on content.
  • Control layout behavior within flex and grid containers.
  • Hide content based on screen size using its responsive display prop.

Flex

Flex component does everything that Box can do, but comes with an additional set of props to organize items along an axis. It provides convenient access to the CSS flexbox properties.

Grid

The Grid component is used to organize the content in columns and rows. Like Box and Flex, it’s made to provide convenient access to the underlying CSS grid properties without any magic of its own.

Section

The Section component adds consistent vertical spacing between major page sections, helping establish visual hierarchy. It offers a few predefined spacing sizes to maintain simplicity and consistency throughout your layout.

Container

Container’s sole responsibility is to provide a consistent max-width to the content it wraps. Like Section, it comes just with a couple of pre-defined sizes that work well with common breakpoints and typical content widths for comfortable reading.

Card

The Card component is used to display content in a card-like format.

Tabs

Organize content sections to be displayed one at a time.

Tab Cards

Organize content sections to be displayed one at a time triggered by clicking on cards.

Common layout props

Each layout component has a set of it’s own specialized props and also a shared set of common layout props. All layout props support responsive object values.

Padding

Padding props can access the space scale steps or accept any valid CSS padding value.

Width

Width props accept any valid CSS width value.

Height

Height props accept any valid CSS height value.

Positioning

Positioning props can change how the element is placed relative to the normal flow of the document. As usual, the corresponding CSS values are accepted for each property, and the space scale steps can be used for the offset values.

Flex children

Each layout component has props used to control the style when it is a child of a flex container.

Grid children

Each layout component has props used to control the style when it is a child of a grid container.

Margin props

Margin props are available on most components in order to provide spacing around the elements. They are not exclusive to layout components. Margin props can access the space scale steps or accept any valid CSS margin value
The margin props may be unavailable on components that don’t render a HTML node or rely on their Root part for layout.