npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-overlapping-panels

v1.2.2

Published

Gestures-driven navigation UI for React.js

Downloads

193

Readme

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