Top nav API
Import
Section titled “Import”The top nav component consists of two main components that work together:
import { TopNav, TopNavItem } from '@cimpress-ui/react';Accessibility notes
Section titled “Accessibility notes”Top nav renders a navigation landmark.
API reference
Section titled “API reference”TopNav
Section titled “TopNav”Displays horizontal navigation, typically below the app header.
TopNavProps
- ReactNode
children *
Section titled “children * ” The contents of the top navigation. Must be one or more of
<TopNavItem>.
TopNavItem
Section titled “TopNavItem”Renders a single navigation item within TopNav.
TopNavItemProps
- StringLikeChildren
children *
Section titled “children * ” The text to display as the navigation item label.
- string
href *
Section titled “href * ” A URL to link to.
- boolean
isActive
Section titled “isActive” Whether the navigation item represents the current page.
- undefined
routerOptions
Section titled “routerOptions” Options for the configured client side router.
- string
hrefLang
Section titled “hrefLang” Hints at the human language of the linked URL. SeeMDN.
- HTMLAttributeAnchorTarget
target
Section titled “target” The target window for the link. See MDN.
- string
The relationship between the linked resource and the current page. See MDN.
- string | boolean
download
Section titled “download” Causes the browser to download the linked URL. A string may be provided to suggest a file name. See MDN.
- string
A space-separated list of URLs to ping when the link is followed. See MDN.
- HTMLAttributeReferrerPolicy
referrerPolicy
Section titled “referrerPolicy” How much of the referrer to send when following the link. See MDN.