Menu

A list of options to help users navigate, or perform actions.

Neutral selected states

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

Installation

Package installation information
Installyarn add @atlaskit/menu
SourceBitbucket.org, (opens new window)
npm@atlaskit/menu, (opens new window)
Bundleunpkg.com, (opens new window)

Props

Section props

children

Required
Description

Children of the section. This should generally be Item or Heading components, but can also be EmptyStates if you want to render errors.

Typestring | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal

hasSeparator

Description

Use this to render a border at the top of the section.

Typeboolean

id

Description

Unique identifier for the element.

Typestring

isList

Description

If your menu contains a list, use this to add <ul> and <li> tags around the items. This is essential for offering better, accessible semantic markup in a list of items.

Typeboolean

isScrollable

Description

Enables scrolling within the section. This won't work unless maxHeight is set on the parent MenuGroup component.

Typeboolean

isSideNavSection

Deprecated
Description

When true, section header inline padding is reduced. This API exists to support functionality in @atlaskit/side-navigation and should not be used. Once the new navigation is fully rolled out, this prop will be removed.

Typeboolean

label

Description

Provide an accessible label for the section via aria-label for assistive technology.

Typestring

ref

Description

Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref).

@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}

Typestring | Ref<HTMLElement>

testId

Description

A testId prop is provided for specified elements, which is a unique string that appears as a data attribute data-testid in the rendered code, serving as a hook for automated tests.

Typestring

title

Description

The text passed into the internal HeadingItem. If a title isn't provided, the HeadingItem won't be rendered, and this component will act as a regular Section.

Typestring

titleId

Description

ID referenced by the menu group wrapper's aria-labelledby attribute. This ID should be assigned to the group title element. Usage of either this, or the label attribute is strongly recommended.

Typestring

Heading item props

children

Required
Description

The text of the heading.

Typestring | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal

headingLevel

Description

Specifies the heading level in the document structure. If not specified, the default is h2.

Type1 | 2 | 3 | 4 | 5 | 6

id

Description

A unique identifier that can be referenced in the labelledby prop of a section to allow assistive technology to announce the name of groups.

Typestring

testId

Description

A testId prop is provided for specified elements, which is a unique string that appears as a data attribute data-testid in the rendered code, serving as a hook for automated tests.

Typestring

Button item props

children

Description

Primary content for the item.

Typestring | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal

className

Deprecated
Description

This prop must not be used and will be deleted soon. Style overrides are not supported. If you need a custom list item, do not use @atlaskit/menu.

Typestring

description

Description

Description of the item. This will render smaller text below the primary text of the item, and slightly increase the height of the item.

Typestring | global.JSX.Element

iconAfter

Description

Element to render after the item text. Usually this is an icon component.

Typestring | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal

iconBefore

Description

Element to render before the item text. Usually this is an icon component.

Typestring | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal

id

Description

Unique identifier for the element.

Typestring

interactionName

Description
Typestring

isDisabled

Description

Makes the element appear disabled as well as removing interactivity. Avoid disabling menu items wherever possible as this isn’t accessible or usable.

Typeboolean

isSelected

Description

Makes the element appear selected.

Typeboolean

isTitleHeading

Deprecated
Description

When true, the title of the item will render as a h2 rather than a span This API exists to support functionality in @atlaskit/side-navigation and should not be used. Once the new navigation is fully rolled out, this prop will be removed.

Typeboolean

onClick

Description

Event that's triggered when the element is clicked.

Type(e: MouseEvent<HTMLElement, globalThis.MouseEvent> | KeyboardEvent<HTMLElement>) => void

onMouseDown

Description

Event that's triggered when the element has been pressed.

Type(event: MouseEvent<Element, globalThis.MouseEvent>) => void

ref

Description
No description.
Type((instance: HTMLElement) => void) | RefObject<HTMLElement>

role

Description

Use this to override the accessibility role for the element.

Typestring

shouldDescriptionWrap

Description

When true, the description of the item will wrap multiple lines if it's long enough.

Typeboolean

shouldTitleWrap

Description

When true, the title of the item will wrap multiple lines if it's long enough.

Typeboolean

testId

Description

A testId prop is provided for specified elements, which is a unique string that appears as a data attribute data-testid in the rendered code, serving as a hook for automated tests.

Typestring

children

Description

Primary content for the item.

Typestring | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal

className

Deprecated
Description

This prop must not be used and will be deleted soon. Style overrides are not supported. If you need a custom list item, do not use @atlaskit/menu.

Typestring

description

Description

Description of the item. This will render smaller text below the primary text of the item, and slightly increase the height of the item.

Typestring | global.JSX.Element

href

Description

Link to another page.

Typestring

iconAfter

Description

Element to render after the item text. Usually this is an icon component.

Typestring | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal

iconBefore

Description

Element to render before the item text. Usually this is an icon component.

Typestring | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal

interactionName

Description
Typestring

isDisabled

Description

Makes the element appear disabled as well as removing interactivity. Avoid disabling menu items wherever possible as this isn’t accessible or usable.

Typeboolean

isSelected

Description

Makes the element appear selected.

Typeboolean

isTitleHeading

Deprecated
Description

When true, the title of the item will render as a h2 rather than a span This API exists to support functionality in @atlaskit/side-navigation and should not be used. Once the new navigation is fully rolled out, this prop will be removed.

Typeboolean

onClick

Description

Event that's triggered when the element is clicked.

Type(e: MouseEvent<HTMLElement, globalThis.MouseEvent> | KeyboardEvent<HTMLElement>) => void

onMouseDown

Description

Event that's triggered when the element has been pressed.

Type(event: MouseEvent<Element, globalThis.MouseEvent>) => void

ref

Description
No description.
Type((instance: HTMLElement) => void) | RefObject<HTMLElement>

rel

Description

The relationship of the linked URL as space-separated link types. Generally you'll want to set this to "noopener noreferrer" when target is "_blank".

Typestring

role

Description

Use this to override the accessibility role for the element.

Typestring

shouldDescriptionWrap

Description

When true, the description of the item will wrap multiple lines if it's long enough.

Typeboolean

shouldTitleWrap

Description

When true, the title of the item will wrap multiple lines if it's long enough.

Typeboolean

target

Description

Where to display the linked URL, see anchor information on mdn for more information.

Typestring

testId

Description

A testId prop is provided for specified elements, which is a unique string that appears as a data attribute data-testid in the rendered code, serving as a hook for automated tests.

Typestring

UNSAFE_isDraggable

Description

Use this to prevent disable of drag functionality on the menu item. Marked as "unsafe" as this may break existing instances of drag handling.

Typeboolean

Custom item props

children

Description

Primary content for the item.

Typestring | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal

className

Deprecated
Description

This prop must not be used and will be deleted soon. Style overrides are not supported. If you need a custom list item, do not use @atlaskit/menu.

Typestring

component

Description

Custom component to render as an item. This can be both a functional component or a class component.

Will return null if no component is defined.

Props passed to CustomItem will be passed down to this component. If the props for component have TypeScript types, CustomItem will extend them, providing type safety for your custom item.

E.g. <CustomItem to="/link" component={RouterLink} />.

NOTE: Make sure the reference for this component does not change between renders else undefined behavior may happen.

TypeReact.ComponentClass<React.PropsWithChildren<TComponentProps>, any> | React.FunctionComponent<React.PropsWithChildren<TComponentProps>>

description

Description

Description of the item. This will render smaller text below the primary text of the item, and slightly increase the height of the item.

Typestring | JSX.Element

iconAfter

Description

Element to render after the item text. Usually this is an icon component.

Typestring | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal

iconBefore

Description

Element to render before the item text. Usually this is an icon component.

Typestring | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal

interactionName

Description
Typestring

isDisabled

Description

Makes the element appear disabled as well as removing interactivity. Avoid disabling menu items wherever possible as this isn’t accessible or usable.

Typeboolean

isSelected

Description

Makes the element appear selected.

Typeboolean

isTitleHeading

Deprecated
Description

When true, the title of the item will render as a h2 rather than a span This API exists to support functionality in @atlaskit/side-navigation and should not be used. Once the new navigation is fully rolled out, this prop will be removed.

Typeboolean

onClick

Description

Event that's triggered when the element is clicked.

Type(e: React.MouseEvent<HTMLElement, MouseEvent> | React.KeyboardEvent<HTMLElement>) => void

onMouseDown

Description

Event that's triggered when the element has been pressed.

Type(event: React.MouseEvent<Element, MouseEvent>) => void

ref

Description
No description.
Typeany

shouldDescriptionWrap

Description

When true, the description of the item will wrap multiple lines if it's long enough.

Typeboolean

shouldTitleWrap

Description

When true, the title of the item will wrap multiple lines if it's long enough.

Typeboolean

testId

Description

A testId prop is provided for specified elements, which is a unique string that appears as a data attribute data-testid in the rendered code, serving as a hook for automated tests.

Typestring

UNSAFE_isDraggable

Description

Use this to prevent disable of drag functionality on the menu item. Marked as "unsafe" as this may break existing instances of drag handling.

Typeboolean

Skeleton heading item props

isShimmering

Description

Causes to the skeleton to have a slight horizontal shimmer. Only use this when you want to bring more attention to the loading content.

Defaultfalse
Typeboolean

testId

Description

A testId prop is provided for specified elements, which is a unique string that appears as a data attribute data-testid in the rendered code, serving as a hook for automated tests.

Typestring

width

Description

Width of the skeleton heading item. You usually don't need to specify this, as it has a staggered width based on :nth-child by default.

Typestring | number

xcss

Description

Bounded style overrides.

Typefalse | (XCSSValue<"paddingBlockEnd" | "paddingBlockStart" | "paddingInlineEnd" | "paddingInlineStart" | "paddingBlock" | "paddingInline", DesignTokenStyles, ""> & ... 4 more ... & { ...; })

Skeleton item props

hasAvatar

Description

Renders a skeleton circle in the iconBefore location. Takes priority over hasIcon.

Typeboolean

hasIcon

Description

Renders a skeleton square in the iconBefore location.

Typeboolean

isShimmering

Description

Causes to the skeleton to have a slight horizontal shimmer. Only use this when you want to bring more attention to the loading content.

Defaultfalse
Typeboolean

isSideNavSkeleton

Deprecated
Description

When true, the size/spacing of the skeleton size/spacing is adjusted to match the side navigation menu item. This API exists to support functionality in @atlaskit/side-navigation and should not be used. Once the new navigation is fully rolled out, this prop will be removed.

Defaultfalse
Typeboolean

testId

Description

A testId prop is provided for specified elements, which is a unique string that appears as a data attribute data-testid in the rendered code, serving as a hook for automated tests.

Typestring

width

Description

Width of the skeleton item. You usually don't need to specify this, as it has a staggered width based on :nth-child by default.

Typestring | number

xcss

Description

Bounded style overrides.

Typefalse | (XCSSValue<"minHeight" | "paddingBlockEnd" | "paddingBlockStart" | "paddingInlineEnd" | "paddingInlineStart" | "paddingBlock" | "paddingInline", DesignTokenStyles, ""> & ... 4 more ... & { ...; })

children

Required
Description

Children of the menu group. This should generally be Section components.

Typestring | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal

isLoading

Description

Used this to tell assistive technologies that the menu group is loading.

Typeboolean

maxHeight

Description

Use this to constrain the menu group's height to a specific value. This must be set if you want to have scrollable sections.

Typestring | number

maxWidth

Description

Use this to constrain the menu group's maximum width to a specific value.

Default800
Typestring | number

menuLabel

Description

Provide an accessible label via aria-label for the menu element for assistive technology.

Typestring

minHeight

Description

Use this to constrain the menu group's minimum height to a specific value.

Typestring | number

minWidth

Description

Use this to constrain the menu group's minimum width to a specific value.

Default320
Typestring | number

onClick

Description

Handler called when clicking on this element, or any children elements. Useful when needing to stop propagation of child events.

Type(event: React.MouseEvent<Element, MouseEvent> | React.KeyboardEvent<Element>) => void

role

Description

Use this to override the accessibility role for the element.

Typestring

spacing

Description

Configure the density of the menu group content.

Type"compact" | "cozy"

testId

Description

A testId prop is provided for specified elements, which is a unique string that appears as a data attribute data-testid in the rendered code, serving as a hook for automated tests.

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