Skip to content
lib components / Structure

🧭 Guide

This guide explains how our structure fit together like Russian dolls.

#Nesting

We have five components to control the layout of content on a page. They’re all invisible, except for the card component. They can be nested inside each other, like Russian dolls. The nesting order, from largest to smallest doll, is as follows:

  1. Grid. Wrap it around Grid.Section components to display the cards inside them in a grid.
  2. Grid.Section. Wrap it around one or multiple cards. Use it to control their size. It also provides appropriate padding and makes cards responsive, by adjusting their width on smaller viewports.
  3. Card. Wrap it around layout, content, or other “regular” components. Use it to visually group related information, controls and actions.
  4. Content.Layout. Wrap it around multiple content components. Use it to control their padding, alignment, and positioning.
  5. Content. Wrap it around one or multiple “regular” components, such as a text-container. Use it to control the padding, position, and aligmnent of the components.

#Interactive Visualization

An interactive visualization of this nested layout system be seen below. Borders and backgrounds have been added to make the normally invisble components visible. This styling can be toggled on and off with the checkboxes below the example.

Card A

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at odio elit. Donec laoreet massa justo, at sagittis nulla volutpat vitae. Nullam efficitur efficitur justo non egestas.

Card B

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque magna massa, elementum ac odio ut, consequat blandit massa. Sed posuere placerat mauris, nec vulputate risus faucibus a. Vestibulum id lacus tincidunt, blandit nulla a, semper nisi. Aliquam sit amet gravida felis. Suspendisse potenti. Nam in sollicitudin nisi.

Card C

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at odio elit. Donec laoreet massa justo, at sagittis nulla volutpat vitae.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at odio elit. Donec laoreet massa justo, at sagittis nulla volutpat vitae.

Card D

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at odio elit. Donec laoreet massa justo, at sagittis nulla volutpat vitae. Nullam efficitur efficitur justo non egestas.

Card E

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at odio elit.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at odio elit.

<Grid> <Grid.Section size="half"> <Card> <Card.Header>Card A</Card.Header> <Content> <Paragraph> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at odio elit. Donec laoreet massa justo, at sagittis nulla volutpat vitae. Nullam efficitur efficitur justo non egestas. </Paragraph> </Content> </Card> </Grid.Section> <Grid.Section size="half"> <Card> <Card.Header>Card B</Card.Header> <Content> <Paragraph> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque magna massa, elementum ac odio ut, consequat blandit massa. Sed posuere placerat mauris, nec vulputate risus faucibus a. Vestibulum id lacus tincidunt, blandit nulla a, semper nisi. Aliquam sit amet gravida felis. Suspendisse potenti. Nam in sollicitudin nisi. </Paragraph> </Content> </Card> </Grid.Section> <Grid.Section size="twothirds"> <Card> <Card.Header>Card C</Card.Header> <Content.Layout> <Content> <Paragraph> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at odio elit. Donec laoreet massa justo, at sagittis nulla volutpat vitae. </Paragraph> </Content> <Content> <Paragraph> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at odio elit. Donec laoreet massa justo, at sagittis nulla volutpat vitae. </Paragraph> </Content> </Content.Layout> </Card> <Card> <Card.Header>Card D</Card.Header> <Content> <Paragraph> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at odio elit. Donec laoreet massa justo, at sagittis nulla volutpat vitae. Nullam efficitur efficitur justo non egestas. </Paragraph> </Content> </Card> </Grid.Section> <Grid.Section size="third"> <Card> <Card.Header>Card E</Card.Header> <Content.Layout> <Content> <Paragraph> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at odio elit. </Paragraph> </Content> <Content> <Paragraph> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at odio elit. </Paragraph> </Content> </Content.Layout> </Card> </Grid.Section> </Grid>