---
title: Top nav items
description: Buttons and elements for the top nav.
order: 3
---

import Image from '@atlaskit/image';

import topNavItemsAnatomyLight from './images/topNavItems-anatomy-light.png';
import topNavItemsAnatomyDark from './images/topNavItems-anatomy-dark.png';
import topNavItemsBehaviour1Light from './images/topNavItems-behaviour-1-light.png';
import topNavItemsBehaviour1Dark from './images/topNavItems-behaviour-1-dark.png';
import topNavItemsBehaviour2Light from './images/topNavItems-behaviour-2-light.png';
import topNavItemsBehaviour2Dark from './images/topNavItems-behaviour-2-dark.png';
import topNavItemsDo1Light from './images/topNavItems-do-1-light.png';
import topNavItemsDo1Dark from './images/topNavItems-do-1-dark.png';
import topNavItemsDo2Light from './images/topNavItems-do-2-light.png';
import topNavItemsDo2Dark from './images/topNavItems-do-2-dark.png';
import topNavItemsDont1Light from './images/topNavItems-dont-1-light.png';
import topNavItemsDont1Dark from './images/topNavItems-dont-1-dark.png';
import topNavItemsDont2Light from './images/topNavItems-dont-2-light.png';
import topNavItemsDont2Dark from './images/topNavItems-dont-2-dark.png';

## Usage

Use top nav items to create common utilities in the top nav within
[layout](/components/navigation-system/layout/examples).

For Atlassian apps,
[Global top navigation (Atlassians only)](https://atlaskit-website-bifrost.stg-east.frontend.public.atl-paas.net/packages/navigation/global-top-navigation)
provides a shared top nav built on Atlassian Design System components. See its documentation for
configuration and integration guidance.

## Parts

<Image
	src={topNavItemsAnatomyLight}
	srcDark={topNavItemsAnatomyDark}
	alt="Diagram of the navigation system top nav"
/>

1. **Start items:** Left-aligned buttons.
2. **Middle items:** Centre-aligned actions.
3. **End items:** Right-aligned buttons.

## Behavior

Top nav items respond to the width of the top nav container. An inline chat panel reduces the space
available to top nav, so items can change even when the viewport size stays the same.

At narrower container widths, some items display as icon buttons and some end items move into the
More menu. See the [examples tab](/components/navigation-system/top-nav-items/examples#responsive)
for responsive behavior at each container width.

<Image
	src={topNavItemsBehaviour1Light}
	srcDark={topNavItemsBehaviour1Dark}
	alt="Top nav at a wider container width with full labels, then at a narrower width with icon buttons and a More menu beside an open chat panel."
/>

Ask Rovo appears after Profile and stays outside the More menu. Selecting it opens chat panel and
hides the Ask Rovo button. Closing chat panel shows the button again.

<Image
	src={topNavItemsBehaviour2Light}
	srcDark={topNavItemsBehaviour2Dark}
	alt="Top nav with an Ask Rovo button after Profile, then the same top nav with chat panel open and Ask Rovo hidden."
/>

## Accessibility

### Accessible names

Provide a meaningful `label` for components that require one, including icon buttons and logo links.
The component uses this label as its accessible name. Icon buttons also use it for their tooltips.

For buttons with visible text, use text that clearly describes the action.

### Popup states

When a top nav item opens a popup, menu, or dialog, pass the relevant `aria-controls`,
`aria-expanded`, and `aria-haspopup` props from that component to the top nav item. These
communicate the relationship and open state to assistive technology.

For triggers that remain visible, use `isSelected` to show when the corresponding popup or panel is
open.

### Keyboard shortcuts

Use the `shortcut` prop to show an available keyboard shortcut in the tooltip. This helps keyboard
users discover the shortcut.

The side nav toggle button automatically includes its shortcut in the tooltip when the shortcut is
enabled. See [layout](/components/navigation-system/layout/examples#side-nav-collapse-and-expand)
for how to enable it.

### Chat panel focus

When connecting Ask Rovo to chat panel, follow the focus management pattern in the
[interactive example](https://atlaskit.stg.atlassian.com/examples/navigation/global-top-navigation/self-hiding-chat).

- Move focus into Rovo Chat when chat panel opens.
- When chat panel closes, return focus to Ask Rovo, unless focus has moved to another control used
  to dismiss chat.
- Keep the Ask Rovo trigger mounted while chat panel is open, but hide it from view, keyboard
  navigation, and assistive technology.

See [layout accessibility guidance](/components/navigation-system/layout/usage#accessibility) for
chat panel landmarks and accessible names.

## Best practices

### Use the top nav items provided

<DoDontGrid>
	<DoDont
		type="do"
		image={{
			url: topNavItemsDo1Light,
			urlDarkMode: topNavItemsDo1Dark,
			alt: 'Two buttons, one outlined and one solid purple, both labeled "Button".',
		}}
	>
		Use the top nav items provided.
	</DoDont>
	<DoDont
		type="dont"
		image={{
			url: topNavItemsDont1Light,
			urlDarkMode: topNavItemsDont1Dark,
			alt: 'Two buttons, one outlined and one solid purple, both labeled "Button".',
		}}
	>
		Don’t use regular button in the top nav, as it won’t respect custom theming.
	</DoDont>
</DoDontGrid>

### Don’t add elements to the top nav area

<DoDontGrid>
	<DoDont
		type="do"
		image={{
			url: topNavItemsDo2Light,
			urlDarkMode: topNavItemsDo2Dark,
			alt: 'Top nav end items showing notifications, help, settings, profile, and Ask Rovo.',
		}}
	>
		Use the top nav items as intended.
	</DoDont>
	<DoDont
		type="dont"
		image={{
			url: topNavItemsDont2Light,
			urlDarkMode: topNavItemsDont2Dark,
			alt: 'Top nav end items with an extra Logout button added after Ask Rovo.',
		}}
	>
		Don’t add elements to the top nav, which may negatively impact consistency across apps.
	</DoDont>
</DoDontGrid>

## Related

- [Layout](/components/navigation-system/layout)
- [Global top navigation (Atlassians only)](https://atlaskit-website-bifrost.stg-east.frontend.public.atl-paas.net/packages/navigation/global-top-navigation)
