Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.
/ react-sidebarjs Public archive

Create mobile sidebar/sidenav experiance in react

License

Notifications You must be signed in to change notification settings

SidebarJS/react-sidebarjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React SidebarJS

Create mobile sidebar/sidenav experiance in react.

npm install react-sidebarjs --save

Demo

Open the demo on your device and try the touch gestures!

Import

import {SidebarJS, sidebarService} from 'react-sidebarjs';

Implementation

import {SidebarJS, sidebarService} from 'react-sidebarjs';
import {NavLink} from 'react-router-dom';

<SidebarJS sidebarjsName="MainSidebar">
  <h3>React SidebarJS</h3>
  <nav>
    <NavLink
      to="/home"
      onClick={() => sidebarService.close('MainSidebar')}>
      Home 
    </NavLink>
  </nav>
</SidebarJS>

API

<SidebarJS
  sidebarjsName={/* string */}
  sidebarjsConfig={/* SidebarConfig | See: https://github.com/SidebarJS/sidebarjs#options */}
  onOpen={() => void}
  onClose={() => void}
  onChangeVisibility={(changes: {isVisible: boolean}) => void}>
</SidebarJS>

About

Create mobile sidebar/sidenav experiance in react

Resources

License

Stars

Watchers

Forks

Packages

No packages published