Skip to content

Latest commit

 

History

History
92 lines (54 loc) · 1.66 KB

File metadata and controls

92 lines (54 loc) · 1.66 KB
id section cssPrefix propComponents ouia
Navigation
components
pf-v5-c-nav
Nav
NavList
NavGroup
NavItem
NavItemSeparator
NavExpandable
true

import './nav.css'; import ArrowRightIcon from '@patternfly/react-icons/dist/esm/icons/arrow-right-icon'; import UserIcon from '@patternfly/react-icons/dist/esm/icons/user-icon';

Examples

Default

Grouped

The following example shows two navigation groups, each with a title prop passed into the nav group component. To keep nav groups accessible an aria-label must be passed in if the title prop is not passed in.

Expandable

Expandable third level

Mixed

Horizontal subnav

Tertiary (deprecated)

Flyout

A flyout should be a Menu component. Press space or right arrow to open a flyout using the keyboard, use the arrow keys to navigate between flyout items, and press escape or left arrow to close a flyout.

Drilldown

Link text

Types

NavSelectClickHandler

The NavItem onClick prop accepts the NavSelectClickHandler type, which is made up of the following argument and return types:

(
  event: React.FormEvent<HTMLInputElement>,
  itemId: number | string,
  groupId: number | string,
  to: string
) => void;