This is a Javascript / React implementation of Discord's OverlappingPanels

Overview

Overlapping Panels

Gestures-driven navigation UI for React.js

NPM

This is a Javascript / React implementation of Discord's OverlappingPanels.

Gesture-based navigation allows us to create more natural interactions and avoids conflict with native gesture navigation.

The current implementation relies almost entirely on CSS, inspired by bree's css-drawer-snap. By using CSS scroll snap we rely on the browser to resolve which scrollbar should be scrolled at what time, so you avoid sidebars opening when scrolling vertically through something such as messages or when scrolling sideways through another element.

Install

npm install --save react-overlapping-panels
yarn add react-overlapping-panels

Usage

import React, { Component } from 'react'

import { OverlappingPanels, ShowIf } from 'react-overlapping-panels'
import 'react-overlapping-panels/dist/index.css'

function MyComponent() {
    return (
        <OverlappingPanels
            width={720}
            height={640}
            leftPanel={{
                component: <span>I am the left panel.</span>,
                width: 300
            }}
            rightPanel={{
                component: <span>I am the right panel.</span>,
                width: 250
            }}
            bottomNav={{
                component: <span>hello!</span>,
                height: 40,
                showIf: ShowIf.Left
            }}>
            <h1>main content!</h1>
        </OverlappingPanels>
    )
}

// See example/src/App.tsx for more working examples.

Develop Locally

Clone the project using:

git clone https://gitlab.insrt.uk/insert/overlapping-panels

Build and watch files for the library:

yarn start

And build and watch files for the example:

cd example
yarn start

To-Do

  • Add RTL support.

Preview

Example (REVOLT PWA): https://autumn.revolt.chat/attachments/GBokkPYJIJqsaXKndNZPkr2xD5H33t5QVAYKsRCqRc/simplescreenrecorder-2021-06-14_14.42.20.mp4

(The following ones are a bit choppy since I recorded them with Peek instead of SSR)

Example in REVOLT: https://autumn.revolt.chat/attachments/ypmI99sJqyeBEt5LI3dNXSE5WIUPlg1kp4XY7NAbnq/Peek%202021-06-14%2013-32.webm Demo taken from examples: https://autumn.revolt.chat/attachments/soJ5hEJYW2vG2kpxlrE98BI8aZu0NY8FMHeYAfL1kH/Peek%202021-06-14%2014-22.webm

You might also like...

This solution aims to simplify the implementation of login using SPID or similar services, such as CIE and eIDAS

This solution aims to simplify the implementation of login using SPID or similar services, such as CIE and eIDAS. It supports both the use of ADFS and B2C as identity federators.

Dec 2, 2022

React Starter Kit — isomorphic web app boilerplate (Node.js, Express, GraphQL, React.js, Babel, PostCSS, Webpack, Browsersync)

React Starter Kit — isomorphic web app boilerplate (Node.js, Express, GraphQL, React.js, Babel, PostCSS, Webpack, Browsersync)

React Starter Kit — "isomorphic" web app boilerplate React Starter Kit is an opinionated boilerplate for web development built on top of Node.js, Expr

Dec 30, 2022

📋 React Hooks for forms validation (Web + React Native)

📋 React Hooks for forms validation (Web + React Native)

English | 繁中 | 简中 | 日本語 | 한국어 | Français | Italiano | Português | Español | Русский | Deutsch | Türkçe Features Built with performance and DX in mind

Dec 29, 2022

:black_medium_small_square:React Move | Beautiful, data-driven animations for React

:black_medium_small_square:React Move | Beautiful, data-driven animations for React

React-Move Beautiful, data-driven animations for React. Just 3.5kb (gzipped)! Documentation and Examples Features Animate HTML, SVG & React-Native Fin

Jan 1, 2023

React features to enhance using Rollbar.js in React Applications

Rollbar React SDK React features to enhance using Rollbar.js in React Applications. This SDK provides a wrapper around the base Rollbar.js SDK in orde

Jan 3, 2023

🎉 toastify-react-native allows you to add notifications to your react-native app (ios, android) with ease. No more nonsense!

🎉 toastify-react-native allows you to add notifications to your react-native app (ios, android) with ease. No more nonsense!

toastify-react-native 🎉 toastify-react-native allows you to add notifications to your react-native app (ios, android) with ease. No more nonsense! De

Oct 11, 2022

Soft UI Dashboard React - Free Dashboard using React and Material UI

Soft UI Dashboard React - Free Dashboard using React and Material UI

Soft UI Dashboard React Start your Development with an Innovative Admin Template for Material-UI and React. If you like the look & feel of the hottest

Dec 28, 2022

A web application to search all the different countries in the world and get details about them which can include languages, currencies, population, domain e.t.c This application is built with CSS, React, Redux-Toolkit and React-Router.

A web application to search all the different countries in the world and get details about them which can include languages, currencies, population, domain e.t.c This application is built with CSS, React, Redux-Toolkit and React-Router.

A web application to search all the different countries in the world and get details about them which can include languages, currencies, population, domain e.t.c This application is built with CSS, React, Redux-Toolkit and React-Router. It also includes a theme switcher from light to dark mode.

Jun 5, 2022

Finished code and notes from EFA bonus class on building a React project without create-react-app

React From Scratch Completed Code This is the completed code for the EFA bonus class on building a React project from scratch. Included are also markd

Oct 11, 2021
Owner
Paul Makles
Paul Makles
KochSnowFlake - implementation of Koch Snowflake with React+ TS

Koch Snowflake if you just want to play with it, follow, FOLLOW THIS LINK if you are curios about math of this project, FOLLOW THIS LINK installation

Mahyar 1 Mar 13, 2022
Plock is a responsive masonry layout implementation for React. Very simple to use and easy to understand.

About Plock ?? Plock is a responsive masonry layout implementation for React. Very simple to use and easy to understand. Can I see a demo? ?? The demo

Renato Pozzi 130 Dec 9, 2022
An implementation of React v15.x that optimizes for small script size

react-lite Introduction react-lite is an implementation of React that optimizes for small script size. Note: react-lite dose not support React v16.x n

工业聚 1.7k Dec 10, 2022
An implementation of GitHub's Primer Design System using React

Primer React A React implementation of GitHub's Primer Design System Documentation Our documentation site lives at primer.style/react. You'll be able

Primer 2.2k Dec 26, 2022
✂ Multiple scenes, one canvas! WebGL Scissoring implementation for React Three Fiber.

react-three-scissor Multiple scenes, one canvas! WebGL Scissoring implementation for React Three Fiber. scissor lets you render an infinite number of

Poimandres 79 Dec 28, 2022
Recoil is an experimental state management library for React apps. It provides several capabilities that are difficult to achieve with React alone, while being compatible with the newest features of React.

Recoil · Recoil is an experimental set of utilities for state management with React. Please see the website: https://recoiljs.org Installation The Rec

Facebook Experimental 18.2k Jan 8, 2023
The ember implementation of UIkit

ember-uikit This addon is a wrapper for the CSS library UIkit which exposes certain components to give users an easy way for using UIkit in ember apps

Adfinis 25 Oct 20, 2022
Ember implementation of Google's Material Design

No longer maintained This project is no longer maintained. For an up-to-date material design project, please use Ember Paper. Ember-material-design Th

Mike Wilson 121 Mar 1, 2022
Simple implementation of online contract signature.

react-pdf-signaturer Simple implementation of online contract signature. Example online demo: https://buynao.github.io/react-pdf-signaturer/ Usage $ g

law 20 Nov 28, 2022
Ember implementation of the game

Ember implementation of the game

null 9 Apr 27, 2022