Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/enzoferey/react-swipe-navigation

A simple navigation system with swipe interaction
https://github.com/enzoferey/react-swipe-navigation

Last synced: about 2 months ago
JSON representation

A simple navigation system with swipe interaction

Awesome Lists containing this project

README

        

# react-swipe-navigation
> A simple navigation system based on panels with swipe interaction for both mobile and PC made with React

## Demo
**[Check out the demo]** (best fit on mobile)

![gif](https://enzoferey.github.io/react-swipe-navigation/demo-gif.gif)

## Install

```
npm install react-swipe-navigation
```

## Usage

```jsx
import React from 'react'
import ReactDOM from 'react-dom';
import ReactSwipeNavigation from 'react-swipe-navigation';

const Navigation = () => (

Home content

Blog content

About content

Contact content


);

ReactDOM.render(
,
document.getElementById('app')
);
```

## Props
- `menu: Array of String` - any length, but more than 6 will not fit well on mobile
- `minX: Number` - minimum X axis pixels difference for valid swipe
- `maxY: Number` - maximum Y axis pixels difference for valid swipe
- `speed: Number` - speed of transitions (default is Swipe.js's default, 300ms)

([See defaults])

## Credits

Used a slightly modified version of [Dmitri Voronianski]'s [react-swipe] which also uses [Swipe.js] itself.

**MIT Licensed**

[Dmitri Voronianski]:
[react-swipe]:
[Swipe.js]:
[Check out the demo]:
[See defaults]: