When constructing layouts in both design and development design system components and patterns are central to the process.
Design system components and patterns are consumers of defined foundations and tokens, avoid deviating from these established assets.
Layout components are primitive components that define the structures used to house content and functionality, they are responsive and adaptable to the end user layouts.
Always start with Cluster and Grid components before considering the more advanced custom components of ClusterLayout and GridLayout. Cluster and Grid ensure all content and functionality is provided to end users no matter their medium - all children containers wrap to fit the viewport with no loss of content occurring.
Layout components are not intended to control the visibility of their components with the one exception - that is the Box component. The Box component can set the CSS display property at any breakpoint which makes it a key use case for the Box component.
The Box component can be used in a utility sense for various content needs.
Margins are not used on components with the exception of stack components, encapsulation is a design system principle we apply to ensure components only control the content and functionality within them.
The Stack and ContentStack components are the only components to utilise margins and they do so to their child elements thereby maintaining our encapsulation rule. As such the Stack and ContentStack components control the vertical rhythm of their child content by applying appropriate spacing per content type.
Start with:
Stack components can also be nested when necessary.