Skip to content

Latest commit

 

History

History
 
 

NavList

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

NavList

Renders a vertical navigation list in conjunction with NavListSection

Basic Usage

NavList uses <NavListSection> to add one or more sections to your navigation.

You can use the <NavListItem> component to add links/buttons to your NavListSection. By using the "to"-prop it will render a react-router <Link>-component, using the "href"-prop will render a regular and the "onClick"-prop will render a button. The component will accept any valid props that these HTML elements accepts.

  import { NavList, NavListItem, NavListSection } from '@folio/stripes/components';
  import Link from 'react-router-dom/Link';

  <NavList>
    <NavListSection label="Some label (optional)" activeLink="/active-link-here" striped>
      <NavListItem onClick={onClickHandler}>Users</NavListItem>
      <NavListItem href="#organization">Organization</NavListItem>
      <NavListItem to="circulation">Circulation</NavListItem>
    </NavListSection>
  </NavList>