Layout → Spacial organization

Components, elements and surfaces are organized to create compositions that make the best use of space.

Building layouts

The Shopify admin is built by using a combination of components like cards, popovers, modals, tables and so on. These components define the elevation of different surfaces in the admin and how they can interact with each other.

A card, a popover and a modal

Surfaces

Surfaces in the admin contain other elements, like badges and text. Cards, popovers, modals and other such components are surfaces that are used to build the admin.

A diagram showing a container, a surface, an inset surface, a divided container, an inset table and the admin’s background

Dividing surfaces

Surfaces can be divided in different ways to offer flexibility when laying out components in the admin.

Nested surfaces can be grouped together within another surface to achieve visual separation between different parts of a component.

Divider lines are reserved for data and index tables.

A card with nested surfaces, and another card that contains a table with horizontal dividers
A card with nested surfaces grouped together
Do

Group nested surfaces together to create visual separation.

A card with horizontal dividers that separates sections of a card
Don't

Don’t use horizontal lines to divide a surface that isn’t a data or index table.

An index table with horizontal dividers
Do

Use horizontal lines to divide a card that acts like a data or index table.

A data table built with nested surfaces
Caution

Building data or index tables with nested surfaces can make them feel inefficient.

A card with nested surfaces grouped in a 2x2 grid
Do

Prioritize a grid or list pattern when dividing surfaces.

A card with surfaces in a masonry pattern
Caution

Avoid breaking symmetry when grouping surfaces together.

Nesting

Nesting surfaces and other elements is crucial to the pro-feel of the Shopify admin. Careful consideration should be taken when using elements of varying border radiuses in order to create the feeling that the interface is purpose-built.

Nested surfaces in a card that have a smaller border radius than the card, achieving a clean, nested look
Do

Reduce the border radius of inset surfaces in order to create a nested look.

A surface that has a equal or larger corner radius than its parent
Don't

Make all nested elements have the same, or larger, border radius than their parent.

A badge that had its corner radius modified to nest within a card
Don't

Change the border radius of elements like buttons or badges when nesting them.

Nesting tables

Tables and lists that exist within another container follow slightly different spacing guidelines. Horizontal padding is adjusted to give more space for data, and to avoid having too much empty space overall.

A nested table
Do

Adjust padding in nested tables to optimize the use of space.

A card that has a table and buttons
Do

Nest tables in cards or other containers when there’s other content in that card.

A card that only contains a nested table
Don't

Avoid nesting a table in a card if it’s the only content of that card.

Shaped elements

Shaped elements contain other design elements within a container that has a certain shape. These elements can live on surfaces or on backgrounds and are often smaller and serve a single purpose, like badges.

Shaped elements often do not have an elevation and their shapes are considered to either be target zones if they’re interactive, or serve as a visual indicator to make them easier to scan.

A collection of buttons and badges
A button with adjusted padding so its prefix icon looks like it’s positioned correctly
Do

Pay attention to spacing when creating smaller elements. This includes using different sizes per side to achieve visual balance.

A slightly larger button next to an input field
Do

Adjust the size of shaped elements so they work well with their siblings, like in the case of a button next to an input field.

Buttons

Buttons are shaped elements, as their contents can vary their sizing to adjust for visual balance. Sizing of buttons depends on context.

Standalone or grouped, buttons have a default size that is widely used in the admin. Because buttons often pull the most attention to a primary action, their size has been adjusted so as to not overwhelm the visual balance of the admin.

A card with a button group in its footer

Breaking alignment

Breaking alignment or spacing may be required in some rare instances. Depending on the layout of the page, alignments may be mathematically inconsistent, but will be visually aligned. Make sure to use imaginary keylines to create neatly aligned containers in the UI if spacing is inconsistent within each container.

If required, different alignment should be applied to separate containers, and never within the same container.

A timeline component following a regular card, with visible keylines denoting alignment differences

    On this page