Layout

Layout components define a page’s structure and the areas for navigation and content.

Feature flag rollouts

Chat panel updates

When the platform-dst-chat-panel-layout feature flag is enabled, the layout supports displaying panel and chat panel at the same time, with updated resizing and responsive behavior.

Neutral selected states

When the platform-dst-tokens-finesse feature flag is enabled, this component uses the new neutral treatment for selected states.

The full page layout with all areas rendered has the structure depicted below.

Example of the navigation system layout areas

When composing your page layout ensure that:

  • The Root element wraps your entire view.
  • Banner, TopNav, SideNav, Main, and ChatPanel are rendered as immediate children of Root.
  • To include a panel, render PanelLayout inside Main.

This example shows how to arrange the layout areas. Supply your app’s content and control whether panel and chat panel are open through the example’s props.

Explore the interactive example, (opens new window) to try resizing and responsive behavior.

import React, { type ReactNode } from 'react'; import { Banner } from '@atlaskit/navigation-system/layout/banner'; import { ChatPanel } from '@atlaskit/navigation-system/layout/chat-panel'; import { Main } from '@atlaskit/navigation-system/layout/main'; import { PanelLayout } from '@atlaskit/navigation-system/layout/panel-layout'; import { PanelSplitter } from '@atlaskit/navigation-system/layout/panel-splitter'; import { Root } from '@atlaskit/navigation-system/layout/root'; import { SideNav, SideNavBody, SideNavFooter, SideNavHeader, SideNavPanelSplitter, SideNavToggleButton, } from '@atlaskit/navigation-system/layout/side-nav'; import { TopNav, TopNavEnd, TopNavMiddle, TopNavStart, } from '@atlaskit/navigation-system/layout/top-nav'; export function LayoutCompositionExample({ banner, startItems, middleItems, endItems, sideNavHeader, sideNavContent, sideNavFooter, children, panel, chat, isPanelOpen, isChatOpen, onChatClose, }: { banner: ReactNode; startItems: ReactNode; middleItems: ReactNode; endItems: ReactNode; sideNavHeader: ReactNode; sideNavContent: ReactNode; sideNavFooter: ReactNode; children: ReactNode; panel: ReactNode; chat: ReactNode; isPanelOpen: boolean; isChatOpen: boolean; onChatClose: () => void; }): React.JSX.Element { return ( <Root isSideNavShortcutEnabled> <Banner>{banner}</Banner> <TopNav> <TopNavStart sideNavToggleButton={ <SideNavToggleButton collapseLabel="Collapse sidebar" expandLabel="Expand sidebar" /> } > {startItems} </TopNavStart> <TopNavMiddle>{middleItems}</TopNavMiddle> <TopNavEnd>{endItems}</TopNavEnd> </TopNav> <SideNav> <SideNavHeader>{sideNavHeader}</SideNavHeader> <SideNavBody>{sideNavContent}</SideNavBody> <SideNavFooter>{sideNavFooter}</SideNavFooter> <SideNavPanelSplitter label="Resize sidebar" /> </SideNav> <Main> <PanelLayout panel={panel} isPanelOpen={isPanelOpen} panelLabel="Project details" resizeLabel="Resize project details" > {children} </PanelLayout> </Main> {isChatOpen && ( <ChatPanel onClose={onChatClose}> <PanelSplitter label="Resize chat" /> {chat} </ChatPanel> )} </Root> ); } export default LayoutCompositionExample;

Layout areas

These are the distinct areas in the layout. These components are designed to contain other components and content.

The tables below show the width settings supplied by the layout components. Apps can override default, minimum, and maximum widths where supported. See the code tab for the available props.

Use the banner area to render a banner component. It will always display at the top of the screen.

Top nav

Use the top nav area to render top nav items.

  • It will display at the top of the screen, below the banner if one is present. Its default height is 56px. Use the height prop to override it.
  • Use the top nav slots to position actions within top nav.
  • The top nav is responsive, with the top nav items changing according to the container width. Opening chat panel reduces the space available to top nav.

Top nav slots

The top nav has three layout components that you must use to position top nav items within the top nav flexbox.

  • TopNavStart: Area for left-aligned items.
  • TopNavMiddle: Area for center-aligned items.
  • TopNavEnd: Area for right-aligned items.
Example of the top nav slots

Top nav custom theming

See the custom theming tab.

Side nav

Use the side nav area to render side nav items, (opens new window).

  • It will display along the leading edge of the screen.
  • Use the side nav slots to position content within the side nav.
  • The side nav is collapsible and expandable, resizable, and responsive.
BreakpointViewport sizeDefault widthMinimum widthMaximum widthLayout mode
xxs–s320–1,023px320px240pxThe larger of its default width or 90% of the screen width minus the chat panelCollapsed; opens as overlay
m–xl1,024px and above320px240pxNo fixed maximum; limited by the minimum widths of the other open inline areasInline. In the collapsed state, opens as a flyout on hover

Side nav slots

The side nav has three layout components that you can use to position components within the side nav flexbox.

  • SideNavHeader: The top part of the side nav.
  • SideNavBody: The middle part of the side nav. It acts as a scroll container. It will grow to take up the available space. This is used to push the footer to the bottom of the side nav.
  • SideNavFooter: The bottom part of the side nav.

Note: make sure to render SideNavBody to ensure that the footer is positioned at the bottom of the side nav, simulating a sticky footer.

Example of the side nav slots

Side nav collapse and expand

The side nav can collapse and expand based on user input or programmatically through hooks.

Toggle button

The side nav can collapse and expand using the SideNavToggleButton from top nav items or the keyboard shortcut.

Keyboard shortcut

The keyboard shortcut Ctrl+[ is enabled globally through the isSideNavShortcutEnabled on Root. It’s disabled by default.

When enabled, use canToggleWithShortcut on SideNav to check individual keypresses and conditionally disable the shortcut for app-specific requirements.

Programmatic control

There are two hooks available for programmatically toggling the side nav.

  • useExpandSideNav
  • useToggleSideNav

These hooks need to be used by components that are rendered as a child of Root, as they require the internal React context that it provides.

useExpandSideNav

Returns a function that will expand the side nav.

This can be useful for ensuring the side nav is expanded before displaying an onboarding spotlight, for example. If the side nav is already expanded, it will simply no-op.

import React, { useCallback } from 'react'; import Button from '@atlaskit/button/default/button'; import { useExpandSideNav } from '@atlaskit/navigation-system/layout/side-nav'; export function ExpandSideNavButtonExample({ onClick, }: { onClick: () => void; }): React.JSX.Element { const expandSideNav = useExpandSideNav(); const handleLaunchSpotlight = useCallback(() => { expandSideNav(); onClick(); }, [onClick, expandSideNav]); return <Button onClick={handleLaunchSpotlight}>Launch spotlight</Button>; } export default ExpandSideNavButtonExample;

useToggleSideNav

Returns a function that will toggle the side nav.

This is useful for toggling the side nav based on a keyboard shortcut.

import { useEffect } from 'react'; import { bind } from 'bind-event-listener'; import { useToggleSideNav } from '@atlaskit/navigation-system/layout/side-nav'; // This could be a hook too export function ToggleSideNavKeyboardShortcutExample(): void { const toggleSideNav = useToggleSideNav(); useEffect(() => { const toggle = (event: KeyboardEvent) => { if (event.key === '[') { toggleSideNav(); } }; return bind(document, { type: 'keydown', listener: toggle, }); }, [toggleSideNav]); } export default ToggleSideNavKeyboardShortcutExample;

Side nav flyout

  • At viewport widths of 1,024px and above (m, l, and xl breakpoints), hovering over SideNavToggleButton when side nav is collapsed opens it as an overlay.
  • Moving the pointer away closes it.
  • If supported ADS layering components, such as popups or dropdown menus, are open within side nav, the flyout stays open until those components close.
  • The side nav flyout is animated on supported browsers. In Firefox, it expands and collapses without animation.

Side nav resizing

Render SideNavPanelSplitter inside SideNav to make the side nav resizable. Double-clicking the splitter collapses the side nav.

Side nav responsive

At viewport widths of 1,023px and below (xxs, xs, and s breakpoints), side nav automatically collapses. Users can open it as an overlay using the toggle button or keyboard shortcut, if enabled.

Main

Use the main area for the page header and page content. It will expand to fill available space.

BreakpointViewport sizeDefault widthMinimum widthMaximum widthLayout mode
xxs–xlAll viewport sizesFills remaining space320px*No fixed maximum; limited by the minimum widths of the other open inline areasInline

*When panel overlays main and side nav is inline, main must be at least 32px wider than panel’s minimum width, without going below its own minimum width.

Panel

Use the panel area to render a panel component.

  • It will display alongside the main content, opposite the side nav.
  • To include a panel, render PanelLayout inside Main.
  • The panel can be opened, closed, and resized, and is responsive.
BreakpointViewport sizeDefault widthMinimum widthMaximum widthLayout mode
xxs–s320–1,023px320px320pxInline: no fixed maximum; limited by the minimum widths of the other open inline areas. Overlay: the larger of its default width or 90% of main’s widthInline, unless space doesn’t allow, in which case it will display as an overlay
m–l1,024–1,767px400px320pxSame as aboveSame as above
xl1,768px and above500px320pxSame as aboveSame as above

Panel opening and closing

See panel loading methods for how to open a panel.

Use isPanelOpen on PanelLayout to control whether the panel is open. Keep PanelLayout mounted when closed so that resized widths are retained.

In this example, your app supplies the panel content and manages whether it is open. Opening the panel moves focus to its close button. Using the close button returns focus to the button that opened the panel.

If you use the panel loading methods to load content, use LayoutWithPanel in place of PanelLayout.

import React, { type ReactNode, useEffect, useRef, useState } from 'react'; import Button from '@atlaskit/button/default/button'; import { PanelLayout } from '@atlaskit/navigation-system/layout/panel-layout'; // Render inside Main. PanelLayout stays mounted when the panel is closed. export function PanelOpenCloseExample({ children, panelContent, }: { children: ReactNode; panelContent: ReactNode; }): React.JSX.Element { const [isPanelOpen, setIsPanelOpen] = useState(false); const triggerRef = useRef<HTMLButtonElement>(null); const closeRef = useRef<HTMLButtonElement>(null); const shouldRestoreFocus = useRef(false); useEffect(() => { if (isPanelOpen) { closeRef.current?.focus(); } else if (shouldRestoreFocus.current) { triggerRef.current?.focus(); shouldRestoreFocus.current = false; } }, [isPanelOpen]); return ( <PanelLayout isPanelOpen={isPanelOpen} panelLabel="Project details" resizeLabel="Resize project details" panel={ <> <Button ref={closeRef} onClick={() => { shouldRestoreFocus.current = true; setIsPanelOpen(false); }} > Close project details </Button> {panelContent} </> } > <Button ref={triggerRef} isSelected={isPanelOpen} onClick={() => setIsPanelOpen(true)}> Open project details </Button> {children} </PanelLayout> ); } export default PanelOpenCloseExample;

Panel resizing

PanelLayout includes its own resize control. You don’t need to add a PanelSplitter.

Panel responsive

The panel becomes an overlay when the open layout areas can no longer fit side by side at their minimum widths. It overlays main before chat panel becomes an overlay.

See responsive behavior for how available space determines these transitions.

Chat panel

Use the chat panel area to render Rovo Chat.

  • It will display along the trailing edge of the screen, alongside top nav and main, below the banner if one is present.
  • Chat panel can be opened, closed, and resized, and is responsive.
BreakpointViewport sizeDefault widthMinimum widthMaximum widthLayout mode
xxs–s320–1,023px320px320pxInline: no fixed maximum; limited by the minimum widths of the other open inline areas. Overlay: the larger of its default width or 90% of the screen widthInline, unless space doesn’t allow, in which case it will display as an overlay
m–xl1,024px and above400px320pxSame as aboveSame as above

Chat panel opening and closing

Apps manage when chat panel opens and closes. Wire up Rovo Chat triggers, such as Ask Rovo in top nav, to open chat panel. Ensure the close button within Rovo Chat closes chat panel.

See the Ask Rovo example for opening and closing chat panel, showing and hiding Ask Rovo, and moving focus.

Pass the same close handler to your chat’s close action and ChatPanel.onClose. This keeps your app’s open state updated when opening side nav closes a chat panel overlay.

Chat panel resizing

Render a PanelSplitter inside ChatPanel to make chat panel resizable.

Chat panel responsive

Chat panel becomes an overlay when main and chat panel can no longer fit side by side at their minimum widths. It overlays the rest of the app, including panel.

See responsive behavior for how available space determines these transitions.

Layout and data connections

Layout manages how areas share space. Apps supply the content and connect data and actions between areas.

Content connectionGuidance
Main content and panel contentThe app supplies panel content and handles selections and edits using its state, callbacks, and data APIs. Layout doesn’t synchronize content between main and panel.
Main content and Rovo ChatThe app’s Rovo integration provides context and supported actions. Rendering Rovo Chat inside ChatPanel doesn’t establish this integration.
Panel content and Rovo ChatOpening or focusing a panel doesn’t automatically make its content available to Rovo Chat as context or for editing. This depends on the app’s Rovo integration, rather than layout.

User resizing

Side nav, panel, and chat panel are resizable. Main isn’t directly resizable; it fills the remaining space.

Resize controls

  • Side nav: Render SideNavPanelSplitter inside SideNav.
  • Panel: PanelLayout includes its own resize control.
  • Chat panel: Render PanelSplitter inside ChatPanel.

Users resize an area by dragging its resize handle. Resizing never triggers an overlay.

Resizing side nav, panel, or chat panel closes any open layer components, such as popups, dropdowns, selects, and tooltips.

How areas share space when inline

Dragging an inline area wider makes other areas narrower. With all areas open inline:

  • Side nav: Dragging side nav wider makes main narrower first, then panel, then chat panel.
  • Panel: Dragging panel wider makes main narrower first, then side nav.
  • Chat panel: Dragging chat panel wider makes main narrower first, then panel, then side nav.

Each affected area reaches its minimum width before the next area becomes narrower. Resizing stops when all affected areas reach their minimum widths.

Dragging an area narrower gives space to main. With all areas open inline:

  • Side nav: Dragging side nav narrower makes main wider. Resizing stops when side nav reaches its minimum width.
  • Panel: Dragging panel narrower makes main wider. Once panel reaches its minimum width, continuing to drag pushes chat panel narrower, giving more space to main. Resizing stops when chat panel reaches its minimum width.
  • Chat panel: Dragging chat panel narrower makes main wider. Resizing stops when chat panel reaches its minimum width.

Width limits

Areas can be resized within their minimum and maximum widths. The tables in each layout area section describe these limits, including differences between inline and overlay modes.

Resizing a panel overlay follows different rules from resizing an inline panel. When panel overlays main beside an inline side nav, the layout maintains a 32px gap between their resize handles. Dragging the panel overlay wider makes side nav narrower once that gap reaches 32px. The drag stops when side nav reaches its minimum width.

When a side nav overlay covers the panel’s resize handle, the covered handle is hidden and disabled.

Width persistence

Each resizable area remembers its user-selected width after it’s closed and reopened.

If available space requires a narrower width, the layout temporarily makes the area narrower. As space becomes available again, the area becomes wider toward its user-selected width.

Only the area whose resize handle was dragged receives a new user-selected width. Areas that resize as a result retain their own width preferences.

To remember widths across page refreshes, write the finalWidth from the onResizeEnd callback to persistent storage, such as localStorage or your app’s user-preferences store. Store each area’s width separately.

When the page loads, read the stored value and pass it to that area’s default width prop before the component mounts. If no saved width exists, the default value will be used.

Use the onResizeEnd callback on the component for each area:

  • Side nav: SideNavPanelSplitter.
  • Panel: PanelLayout.
  • Chat panel: PanelSplitter inside ChatPanel.

The example saves one width per area and restores it through defaultWidth or defaultPanelWidth. Missing or invalid saved values, or unavailable storage, leave the component defaults in place.

For apps rendered only in the browser, call readSavedWidths() before mounting the layout and pass the result as savedWidths. For server-rendered apps, supply the same initial width values on the server and client. Read browser storage outside rendering.

With chat panel layout enabled, panel remembers separate widths for inline and overlay modes. This example saves only the last resized panel width and uses it as the initial default when the layout mounts again.

import React, { type ReactNode } from 'react'; import { ChatPanel } from '@atlaskit/navigation-system/layout/chat-panel'; import { Main } from '@atlaskit/navigation-system/layout/main'; import { PanelLayout } from '@atlaskit/navigation-system/layout/panel-layout'; import { PanelSplitter } from '@atlaskit/navigation-system/layout/panel-splitter'; import { Root } from '@atlaskit/navigation-system/layout/root'; import { SideNav, SideNavBody, SideNavPanelSplitter, } from '@atlaskit/navigation-system/layout/side-nav'; type Area = 'side-nav' | 'panel' | 'chat'; type SavedWidths = Partial<Record<Area, number>>; function readWidth(area: Area): number | undefined { try { const value = Number(window.localStorage.getItem(`navigation-width:${area}`)); return Number.isFinite(value) && value > 0 ? value : undefined; } catch { // Storage may be unavailable. Leave the component's default width in place. return undefined; } } // Call in your client bootstrap before mounting the layout, not during server rendering. export function readSavedWidths(): SavedWidths { return { 'side-nav': readWidth('side-nav'), panel: readWidth('panel'), chat: readWidth('chat') }; } function saveWidth(area: Area, width: number): void { try { window.localStorage.setItem(`navigation-width:${area}`, String(width)); } catch { // Resizing still works when persistent storage is unavailable. } } export function WidthPersistenceExample({ savedWidths, children, navigation, panel, chat, isPanelOpen, isChatOpen, onChatClose, }: { savedWidths: SavedWidths; children: ReactNode; navigation: ReactNode; panel: ReactNode; chat: ReactNode; isPanelOpen: boolean; isChatOpen: boolean; onChatClose: () => void; }): React.JSX.Element { return ( <Root> <SideNav defaultWidth={savedWidths['side-nav']}> <SideNavBody>{navigation}</SideNavBody> <SideNavPanelSplitter label="Resize sidebar" onResizeEnd={({ finalWidth }) => saveWidth('side-nav', finalWidth)} /> </SideNav> <Main> <PanelLayout panel={panel} isPanelOpen={isPanelOpen} defaultPanelWidth={savedWidths.panel} onResizeEnd={({ finalWidth }) => saveWidth('panel', finalWidth)} panelLabel="Project details" resizeLabel="Resize project details" > {children} </PanelLayout> </Main> {isChatOpen && ( <ChatPanel defaultWidth={savedWidths.chat} onClose={onChatClose}> <PanelSplitter label="Resize chat" onResizeEnd={({ finalWidth }) => saveWidth('chat', finalWidth)} /> {chat} </ChatPanel> )} </Root> ); } export default WidthPersistenceExample;

Responsive behavior

The layout uses the viewport width and the widths of the open areas to determine their sizes and whether they fit inline (side by side). Opening or closing an area also changes the space available.

Breakpoint changes

  • Panel and chat panel: Default widths vary by viewport breakpoint. See the width tables in the panel and chat panel sections.
  • Side nav: At viewport widths of 1,023px and below (xxs, xs, and s breakpoints), side nav automatically collapses. Users can open it as an overlay.

When areas fit inline

Side nav, panel, and chat panel will use either their default widths, or the width that the user has resized them to, given there is enough space. Main fills the remaining space.

If the open areas don’t fit at their default or user-chosen widths, the layout makes areas narrower in this order:

  1. Main
  2. Panel
  3. Chat panel
  4. Side nav

Each area reaches its minimum width before the next area becomes narrower.

These narrower widths are temporary. The layout uses the user’s chosen width, or the default width, whenever there’s enough space.

When areas do not fit inline

If the open areas can’t fit side by side at their minimum widths, panel overlays main first. If main and chat panel still don’t fit, chat panel overlays the rest of the app, including panel.

Panel and chat panel become overlays based on the minimum widths of the open areas, rather than fixed viewport breakpoints. Changing minimum widths changes when an overlay is needed.

Overlay interactions

  • A side nav overlay can appear above a panel overlay.
  • When side nav and chat panel both use overlays, only one can be open at a time. Opening one closes the other. Closing one doesn’t reopen the other.

Skip links let keyboard users jump directly to layout areas without tabbing through the preceding content.

Root automatically provides skip-link navigation as the first tab stop in the layout, allowing keyboard users to move directly to a layout area. Layout components register their links automatically.

Use useSkipLink to register custom skip links where appropriate. The useSkipLink hook accepts an optional third argument to manually specify the index of the skip link in the list.

You can also optionally use the useSkipLinkId hook to retrieve a unique ID for use for your skip link.

Was this page helpful?
We use this feedback to improve our documentation.
© 2026 AtlassianTrademark, (opens new window)Privacy, (opens new window)License