Skip to content

SideNavigation

Props

API reference for SideNavigation. For usage examples, see the React tab.

SideNavigation

NameTypeDefault
aria-label (required)string

Accessible label applied to the side navigation panel and nested navigation landmark.

children (required)ReactNode

Content rendered next to the side navigation panel.

items (required)SideNavigationDataItem[]

Navigation item and section data rendered inside the side panel.

aboutstring
accessKeystring
autoSavestring
closeOnNavigate"mobile" | boolean"mobile"

Closes the panel after a navigation item is pressed. Defaults to closing on mobile viewports only.

colorstring
contentstring
contentAriaLabelstring

Accessible label for the content landmark when needed.

contentAsPanelInsetElement"main"

Element rendered for the content area.

contextMenustring
currentKeyKey

Key of the current item. Used to apply the current page state.

dangerouslySetInnerHTML{ __html: string | TrustedHTML; }
datatypestring
defaultCheckedboolean
defaultOpenbooleantrue

Initial open state when uncontrolled.

Note: On mobile viewports the panel renders as an overlay drawer, so defaultOpen={true} will show the drawer immediately on load. Consider using controlled open state with a responsive check if this is not desired.

disableKeyboardShortcutbooleanfalse

Disable the keyboard shortcut for toggling the panel.

exportpartsstring

See: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts (opens in new tab)

footerReactNode

Optional panel footer content.

headerReactNode

Optional content rendered in the panel header.

inlistany
inputMode"decimal" | "email" | "none" | "numeric" | "search" | "tel" | "text" | "url"

Hints at the type of data that might be entered by the user while editing the element or its contents

See: https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute (opens in new tab)

itemIDstring
itemPropstring
itemRefstring
itemScopeboolean
itemTypestring
keyboardShortcutstring"b"

Keyboard shortcut key (used with Cmd/Ctrl modifier).

layoutPanelLayout"viewport"

Layout mode of the panel. Use viewport for application shells and contained for bounded regions.

openboolean

Controlled open state. When provided, component becomes controlled.

partstring

See: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part (opens in new tab)

prefixstring
propertystring
radioGroupstring
relstring
resourcestring
resultsnumber
revstring
securitystring
sidePanelSide"left"

Which side to position the panel.

typeofstring
unselectable"off" | "on"
vocabstring

SideNavigation.Trigger

NameTypeDefault
childrenChildrenOrFunction<ButtonRenderProps>

The children of the component. A function may be provided to alter the children based on component state.

isDisabledboolean

Whether the button is disabled.

isPendingboolean

Whether the button is in a pending state. This disables press and hover events while retaining focusability, and announces the pending state to screen readers.