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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@luciodale/swipe-bar

v1.3.63

Published

Toggling and swiping sidebars like in a native app, built with React. Inspired by the native iOS swipe gestures.

Downloads

1,171

Readme

Documentation  ·  NPM  ·  GitHub

Install

npm install @luciodale/swipe-bar

Quick Start

import { SwipeBarProvider, SwipeBarLeft } from "@luciodale/swipe-bar";

function App() {
  return (
    <SwipeBarProvider>
      <SwipeBarLeft className="bg-gray-900 text-white">
        <nav>
          <a href="/dashboard">Dashboard</a>
          <a href="/settings">Settings</a>
        </nav>
      </SwipeBarLeft>

      <main>Your app content</main>
    </SwipeBarProvider>
  );
}

Swipe from the left edge on mobile or click the toggle on desktop. That's it.

Features

  • Zero dependencies — just React
  • Left, right, and bottom — all three directions with the same API
  • Native touch gestures — edge swipe detection, drag tracking, velocity commit/cancel
  • Multi-instance — multiple sidebars per direction with independent state via id prop
  • Bottom sheets with mid-anchor — swipe to a halfway stop, then again to fully open
  • Typed sidebar metadata — attach a generic type map and get compile-time safety
  • Programmatic control — open, close, and read state from anywhere via context hook
  • Cross-direction locking — one direction at a time, no gesture conflicts
  • Accessibility — focus trap, Escape to close, aria attributes, keyboard navigation
  • Runtime configuration — change any prop at runtime via setGlobalOptions

Programmatic Control

import { useSwipeBarContext } from "@luciodale/swipe-bar";

function Header() {
  const { openSidebar, closeSidebar, isLeftOpen } = useSwipeBarContext();

  return (
    <header>
      <button onClick={() => openSidebar("left")}>Menu</button>
    </header>
  );
}

Bottom Sheets

import { SwipeBarBottom } from "@luciodale/swipe-bar";

<SwipeBarBottom sidebarHeightPx={400} isAbsolute midAnchorPoint>
  <div>Sheet content</div>
</SwipeBarBottom>

Multi-Instance

Give each sidebar a unique id. Each instance operates independently.

<SwipeBarLeft id="nav" isAbsolute>
  <nav>Navigation</nav>
</SwipeBarLeft>

<SwipeBarLeft
  id="settings"
  isAbsolute
  swipeToOpen={false}
  showToggle={false}
  swipeBarZIndex={70}
  overlayZIndex={65}
>
  <div>Settings panel</div>
</SwipeBarLeft>
const { openSidebar, leftSidebars } = useSwipeBarContext();

openSidebar("left", { id: "settings" });
const isSettingsOpen = leftSidebars.settings?.isOpen ?? false;

Docs

Full documentation, configuration reference, and live examples at koolcodez.com/projects/swipe-bar.

License

MIT