NavigationBar

NavigationBar

import NavigationBar from "@kiwicom/orbit-components/lib/NavigationBar";
import LinkList from "@kiwicom/orbit-components/lib/LinkList";
import TextLink from "@kiwicom/orbit-components/lib/TextLink";
<NavigationBar onMenuOpen={handleDrawerOpen}>
<LinkList direction="row">
<TextLink> Link 1 </TextLink>
<TextLink> Link 2 </TextLink>
<TextLink> Link 3 </TextLink>
</LinkList>
</NavigationBar>

Props

NameTypeDefaultDescription
childrenReact.NodeThe content of the NavigationBar.
dataTeststringOptional prop for testing purposes.
idstringSet id for NavigationBar.
onMenuOpen() => void \| PromiseFunction for handling onClick event on HamburgerMenu icon. If null, the HamburgerMenu won’t appear.
onHide() => void \| PromiseFunction for handling event when the NavigationBar disappears.
onShow() => void \| PromiseFunction for handling event when the NavigationBar appears.
hideOnScrollbooleantrueTurn on or off hiding navigation bar on scroll
openTitlestring"Open navigation menu"Property for passing translation string to open Button.
bottomStyle"shadow" \| "border""shadow"Property for setting bottom style of NavigationBar.
ariaLabelstring"navigation"Optional prop for aria-label value (accessibility).

Accessibility

  • The ariaLabel prop allows you to specify an aria-label attribute for the component. This attribute provides additional information to screen readers, enhancing the accessibility of the component. By using ariaLabel, you can ensure that users who rely on assistive technologies receive the necessary context and information about the component’s purpose and functionality.