Skip to content

jmfurlott/react-nav-tabs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-nav-tabs

Description

A set of components making tabbed navigation easier. Optionally supports react-router if you'd like the tab panes to show routes instead of predefined components.

The main goal of this project is to provide flexible class names, elements, and react-router in a concise way.

Example Usage

import {
  NavTabs,
  NavTabList,
  NavTab,
  NavTabPaneList,
  NavTabPane
} from "react-nav-tabs";


<NavTabs active="profile" element="div" className="app">
  <NavTabList element="nav" className="app__navigation">
    <NavTab element="div" className="app__navigation-home" key="home">
      <h1>Home</h1>
    </NavTab>
    <NavTab element="div" className="app__navigation-profile" key="profile">
      <h1>Profile</h1>
    </NavTab>
  </NavTabList>
  <NavTabPaneList element="main" className="app__body">
    <NavTabPane key="home" element="div" className="app__body__home">
      <HomeComponent />
    </NavTabPane>
    <NavTabPane key="profile" element="div" className="app__body__profile">
      <ProfileComponent />
    </NavTabPane>
  </NavTabPaneList>
</NavTabs>

Please view the docs for more information on the API.

License

MIT

About

Generic, flexible tabbed based navigation with optional react-router support

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published