Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Layout Metrics and Keylines
This document is a preview.

Metrics and Keylines

Baseline Grids Expand and collapse content An arrow that points down when collapsed and points up when expanded.

All components align to an 8 dp square baseline grid. Type aligns to a 4 dp baseline grid. Iconography in toolbars align to a 4 dp square baseline grid. This applies to mobile, tablet, and desktop.
baseline-01
Baseline Grids
Baseline Grids
baseline grids
See detailed information on components .
Baseline grids
See detailed information on typography .

Keylines and Spacing Expand and collapse content An arrow that points down when collapsed and points up when expanded.

Mobile

The mobile layout template includes a wide variety of screens and information about how keylines and spacing work across screen edges and elements. Below is a sample of the screens included in the download.

Keylines and Spacing on Mobile
Context
This screen shows how icons, avatars, and a 2-line list align on the left and how a 56 dp floating action and text align on the right.
Keylines and Spacing on Mobile
Vertical Keylines and Horizontal Margins
Vertical keyline at 16 dp from the left and right edges. Content associated with an icon or avatar aligns 72 dp from the left edge. 16 dp horizontal margins on mobile.
Keylines and Spacing on Mobile
Vertical Spacing
1. 24dp 2. 56dp 3. 48dp 4. 72dp
Keylines and Spacing on Mobile
Context
This screen shows how icons, avatars, a 2-line list, a subtitle, and a 40 dp floating action align on the left. Icons align to the right.
Keylines and Spacing on Mobile
Vertical Keylines and Horizontal Margins
Vertical keyline for icons at 16 dp from the left and right edges. Content associated with an icon or avatar aligns 72 dp from the left edge.

16 dp horizontal margins on mobile.

Keylines and Spacing on Mobile
Vertical Spacing
1. 24dp 2. 56dp 3. 72dp 4. 48dp 5. 8dp
Keylines and Spacing on Mobile
Context
This screen shows how icons align on the left and how icons and a 56 dp floating action align on the right.
Keylines and Spacing on Mobile
Vertical Keylines and Horizontal Margins

Vertical keyline for icons at 16 dp from the left edge. Content associated with an icon or avatar aligns 72 dp from the left edge. An extra keyline is added 32 dp from the right edge to account for the 56dp circular floating action. This allows icons below the floating action to align.

16 dp horizontal margins on mobile.

Keylines and Spacing on Mobile
Vertical Spacing
1. 24dp 2. 56dp 3. 8dp 4. 72dp
Keylines and Spacing on Mobile
Context
This screen shows how icons, avatars, and text align on the left and how the floating action, icons, and text align on the right.
Keylines and Spacing on Mobile
Vertical Keylines and Horizontal Margins

Vertical keyline for icons at 16 dp from the left and right edges. Content associated with an icon or avatar aligns 72 dp from the left edge.

16 dp horizontal margins on mobile.

Keylines and Spacing on Mobile
Vertical Spacing
1. 24dp 2. 56dp 3. 48dp 4. 8dp
Keylines and Spacing on Mobile
Context
This screen shows the width of a side navigation menu and how icons, avatars, and text align on the left and icons on the right.
Keylines and Spacing on Mobile
Vertical Keylines and Horizontal Margins

Vertical keyline for icons at 16 dp from the left and right edges of the side nav. Content associated with an icon or avatar aligns 72 dp from the left edge of the side nav. The width of the side nav is equal to the width of the screen minus the height of the action bar, or in this case 56 dp from the right edge of the screen.

16 dp horizontal margins on mobile.

Keylines and Spacing on Mobile
Vertical Spacing
1. 48dp 2. 8dp 3. 56dp

Tablet

The tablet layout template includes 14 different screens and shows how keylines and spacing work across screen edges and elements. Below is a sample of two of the 14 screens included in the download.
Keylines and Spacing Tablet
Keylines and Spacing Tablet
Keylines and spacing Tablet
1. 24dp 2. 64dp 3. 8dp 4. 72dp
Keylines and spacing Tablet
Keylines and spacing Tablet
Keylines and Spacing Tablet
1. 24dp 2. 64dp 3. 8dp 4. 48dp 5. 80dp

Desktop

The desktop layout template includes 4 different screens each with 4 different window sizes and shows how keylines and spacing work across windows and elements. Below is a sample of a screen available in the download. Based on the window size, the keylines and spacing blocks will inherit grid rules from both tablet and mobile.
Keylines and spacing Desktop

Ratio Keylines Expand and collapse content An arrow that points down when collapsed and points up when expanded.

Ratio Keylines

Applies to mobile screen width and UI element widths on mobile, tablet, and desktop.

Screen width
Screen width
Example
Example
Element width
Element width
Example
Example

Incremental Keylines Expand and collapse content An arrow that points down when collapsed and points up when expanded.

Incremental Keylines

An incremental keyline defines an increment, like the height of the action bar, and uses a multiple of that increment to determine the size and position of other elements in the app.

Applies mostly to desktop, often to tablet, rarely to mobile. Number of increments will vary based on window size.

incremental keylines
incremental keylines
incremental keylines
incremental keylines

Touch Target Size Expand and collapse content An arrow that points down when collapsed and points up when expanded.

Minimum touch target size is 48 dp. Keep this in mind when spacing icons (24 dp) or avatars (40 dp) in a layout. Touch targets shouldn’t overlap.

touch target
touch target