Skip to content

SplitPageLayout

Draft
Provides structure for a split page layout, including independent scrolling for the pane and content regions. Useful for responsive list/detail patterns, when an item in the pane updates the page content on selection.
import {SplitPageLayout} from '@primer/react/drafts'

If you need a more flexible layout component, consider using the PageLayout component.

Examples

Minimal

With overflowing pane content

With pane hidden on narrow viewports

With content hidden on narrow viewports

Without dividers

With pane on right

With condensed padding

Without padding

With non-sticky pane

With a custom sticky header

Props

SplitPageLayout

NameTypeDefaultDescription
sx
SystemStyleObject
Style overrides to apply to the component. See also overriding styles.

SplitPageLayout.Header

NameTypeDefaultDescription
padding
| 'none'
| 'condensed'
| 'normal'
'normal'The amount of padding inside the header.
divider
| 'none'
| 'line'
| {
    narrow?:
      | 'none'
      | 'line' 
      | 'filled'
    regular?:
      | 'none'
      | 'line'
    wide?:
      | 'none'
      | 'line'
  }
'line'
hidden
| boolean
| {
    narrow?: boolean
    regular?: boolean
    wide?: boolean
  }
falseWhether the header is hidden.
sx
SystemStyleObject
Style overrides to apply to the component. See also overriding styles.

SplitPageLayout.Content

NameTypeDefaultDescription
width
| 'full'
| 'medium'
| 'large'
| 'xlarge'
'large'The maximum width of the content region.
padding
| 'none'
| 'condensed'
| 'normal'
'normal'The amount of padding inside the content.
hidden
| boolean
| {
    narrow?: boolean
    regular?: boolean
    wide?: boolean
  }
falseWhether the content is hidden.
sx
SystemStyleObject
Style overrides to apply to the component. See also overriding styles.

SplitPageLayout.Pane

NameTypeDefaultDescription
position
| 'start'
| 'end'
| {
    narrow?:
      | 'start'
      | 'end'
    regular?:
      | 'start'
      | 'end'
    wide?:
      | 'start'
      | 'end'
  }
'start'
width
| 'small'
| 'medium'
| 'large'
'medium'The width of the pane.
sticky
boolean
trueWhether the pane should stick to the top of the screen while the content scrolls.
offsetHeader
number | string
0Use offsetHeader along with the sticky prop to push the sticky pane down to make room for a sticky header if necessary. Use the type `string` to specify the height with a unit i.e. 5rem; otherwise the type `number` will be taken as px.
padding
| 'none'
| 'condensed'
| 'normal'
'normal'The amount of padding inside the pane.
divider
| 'none'
| 'line'
| {
    narrow?:
      | 'none'
      | 'line' 
      | 'filled'
    regular?:
      | 'none'
      | 'line'
    wide?:
      | 'none'
      | 'line'
  }
'line'
hidden
| boolean
| {
    narrow?: boolean
    regular?: boolean
    wide?: boolean
  }
falseWhether the pane is hidden.
sx
SystemStyleObject
Style overrides to apply to the component. See also overriding styles.

SplitPageLayout.Footer

NameTypeDefaultDescription
padding
| 'none'
| 'condensed'
| 'normal'
'normal'The amount of padding inside the footer.
divider
| 'none'
| 'line'
| {
    narrow?:
      | 'none'
      | 'line' 
      | 'filled'
    regular?:
      | 'none'
      | 'line'
    wide?:
      | 'none'
      | 'line'
  }
'line'
hidden
| boolean
| {
    narrow?: boolean
    regular?: boolean
    wide?: boolean
  }
falseWhether the footer is hidden.
sx
SystemStyleObject
Style overrides to apply to the component. See also overriding styles.

Status

Alpha

  • Component props are documented on primer.style/react.
  • Component does not have any unnecessary third-party dependencies.
  • Component can adapt to different themes.
  • Component can adapt to different screen sizes.
  • Component has 100% test coverage.

Beta

  • Component is used in a production application.
  • Common usage examples are documented on primer.style/react.
  • Common usage examples are documented in storybook stories.
  • Component has been reviewed by a systems designer and any resulting issues have been addressed.
  • Component has been manually reviewed by the accessibility team and any resulting issues have been addressed.

Stable

  • Component API has been stable with no breaking changes for at least one month.
  • Feedback on API usability has been sought from developers using the component and any resulting issues have been addressed.
  • Component has corresponding design guidelines documented in the interface guidelines.
  • Component has corresponding Figma component in the Primer Web library.