SplitPageLayout

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.
  • Alpha
  • Reviewed for accessibility
import {SplitPageLayout} from '@primer/react'

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

With resizable pane

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.
resizable
boolean
falseWhen true, the pane may be resized by the user.
widthStorageKey
string
'paneWidth'Provide a key used by localStorage to persist the size of the pane on the client.
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 and basic example usage of the component 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 robust unit test coverage (100% where achievable).
  • Component has visual regression coverage of its default and interactive states.
  • Component does not introduce any axe violations.
  • Component has been manually reviewed by the accessibility team and any resulting issues have been addressed.

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 does not introduce any performance regressions.

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.
  • Tooling (such as linters, codemods, etc.) exists to prevent further use of alternatives.