Master-detail

The master-detail pattern is a flexible approach to navigating through hierarchical pages. It takes advantage of a clear drill-in experience, while providing quick navigation between siblings, and relies on the system breadcrumb and in-page 'up' buttons for navigation.

Examples

Added GitHub aliases
Cecil Folk
Remove reference to Design System components
Cecil Folk
Using new design/pattern/components
Ashley McCarthy
Added GitHub aliases
Created by Cecil Folk
Commit
Date
Finalized GitHub aliases
abc123
2019-03-05
Added Configuration
def456
2019-03-04
Updated CSS
ghi789
2019-03-03
Constructed pylons
123abc
2019-03-02

Usage

Do

  • Use when navigation relies on a drill-down experience
  • Use to allow quickly moving between details from a list of items

Don’t

  • Use when another navigation pattern is more suitable (e.g. a side panel without master view)
  • Include content in the master panel that is not present in the master view

Anatomy

The master–detail pattern includes two views: the master view and the detail view.

Master-detail anatomy
  • (1) The master view includes interactive elements (commonly a table), that allow the drill-in experience to happen. When an item is activated, the user navigates to a new page: the detail view (2).
  • (2) Once the user activates an item, the detail view appears with a master panel and a detail area. The master panel is a simplified version of the master view.
  • (3) The detail view allows quick navigation between items.

Note: Some exceptional experiences may include a master view only in small screens or mobile experiences. This includes cases like Settings pages or other pages that don't benefit from having a master view.

Detail view

Master-detail detail view
  • (1) Master panel: Master panels live outside the detail area, and have their own scrolling area. They also have a fixed width, which depends on the screen size. In small screens, master panels are not visible, so page designs need to keep in mind not to include essential actions or information.
  • (2) Detail area
  • (3) Detail view

Master panel

Master-detail master panel anatomy
  • (1) Master panel header area: A header area may include a title with other elements, like an "up” button.
  • (2) Master panel local navigation: An optional area with flexible height and custom elements.
  • (3) Collection list: A collection of items, generally represented by rows.
  • (4) Title: Use the same title as the previous page, or a simplified version. Unlike titles in pages, titles in the master panel are not interactive, except for the "up” button.
  • (5) Active item list: The collection list needs to always have one active item. Depending on the flow, the active list item may be hidden after an action (e.g. when the user narrows the list using an inline filter).

Breakpoints:

  • Small and xsmall (narrower than 1024px): Side panels are not visible in small and xsmall breakpoints
  • Medium (wider than or equal to 1024px): Side panel at 280px
  • Large (wider than or equal to 1366px): Side panel at 320px
  • Xlarge (wider than 1920px): Side panel at 384px

Alignment

Master panel title aligment

The master panel title and list items should align as much as possible, particularly when the title area includes a back button, and the list items include icons (1). The same rules apply to alignment between the master panel title and the detail area header (2). It’s OK to include elements such as long titles and descriptions in the detail area header, however alignment will work better for single-line titles.

Collection lists

Master panel collection lists - single-line items

Single-line items

  • (1) Single-line item, no visual
  • (2) Single-line item, 16px visual
  • (3) Single-line item, 24px visual
Master panel collection lists - two-line items

Two-line items

  • (1) Two-line item, no visual
  • (2) Two -line item, 16px visual
  • (3) Two -line item, 24px visual
Master panel collection lists - tree-based items

Tree-based items

  • (1) Single-line, single-line
  • (2) Different styles for first-level
Master panel collection lists - sections

Sections

  • (1) Subtle section title
  • (2) Strong section title
Master panel collection lists - side labels and elements

Side labels and elements

  • (1) Side label, single-line
  • (2) Side label, two-line
  • (3) Custom side elements

Scrolling behavior

Master panel header scrolling behavior

Compact header while scrolling

Master panel header scrolling behavior with local navigation

Master panel with local navigation

Related

APIs

IMasterPanelProps

className
string
Optional className to emit onto the root MasterPanel element
showOnSmallScreensfalse
boolean
Set to true to always show the master panel on small screens. By default the master panel will hide, and the details panel can be replaced with a fullscreen master panel by calling masterPanelContext.setDetailsPanelVisibility(false)

IMasterPanelInternalProps

classNameInherited From: IMasterPanelProps
string
Optional className to emit onto the root MasterPanel element
layerrequired
IMasterDetailsContextLayer<any>
Current master details context layer.
showOnSmallScreensfalseInherited From: IMasterPanelProps
boolean
Set to true to always show the master panel on small screens. By default the master panel will hide, and the details panel can be replaced with a fullscreen master panel by calling masterPanelContext.setDetailsPanelVisibility(false)

IMasterPanelHeaderProps

subTitle
React.ReactNode
Optional subtitle text
titlerequired
string
Title text to display
titleAriaLevel
number
Optional number to specify the aria level. Defaults to 1.

ISingleLayerMasterPanelProps

classNameInherited From: IMasterPanelProps
string
Optional className to emit onto the root MasterPanel element
contentRef
React.Ref<HTMLDivElement>
Ref to the scrolling content div; avoid using if possible
renderContent
() => JSX.Element
Renders the content area of the MasterPanel Your List/Tree goes here
renderHeader
() => JSX.Element
For standard titles, mark the title element with "bolt-master-panel-header-title" For standard subtitles, mark the subtitle element with "bolt-master-panel-header-subtitle bolt-master-panel-header-secondary" Mark all secondary elements with the css class "bolt-master-panel-header-secondary" so they are hidden on scroll @see SimpleMasterDetailsHeader for a good basic implementation of title and subtitle
renderSearch
() => JSX.Element
Optional renderer for any search functionality Renders into a styled area that scrolls with the content
showOnSmallScreensfalseInherited From: IMasterPanelProps
boolean
Set to true to always show the master panel on small screens. By default the master panel will hide, and the details panel can be replaced with a fullscreen master panel by calling masterPanelContext.setDetailsPanelVisibility(false)

ISingleLayerMasterPanelHeaderProps

onBackButtonClick
() => void
Handler for when back button is clicked
subTitleInherited From: IMasterPanelHeaderProps
React.ReactNode
Optional subtitle text
titlerequiredInherited From: IMasterPanelHeaderProps
string
Title text to display
titleAriaLevelInherited From: IMasterPanelHeaderProps
number
Optional number to specify the aria level. Defaults to 1.

IDetailsPanelProps

className
string
Optional className to emit onto the root DetailPanel element

Loaded Master-detail page