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.4.1

Published

Gesture driven React sidebar with spring physics. Touch and mouse support, native app feel for mobile first web interfaces. Tiny bundle, zero runtime dependencies.

Readme

Documentation  ·  NPM  ·  GitHub

npm version npm downloads bundle size license

Why swipe-bar

Coming from Vaul, shadcn Sheet, react-sliding-pane, or hand-rolled Framer Motion panels, these are the behaviors you get without wiring:

  • Edge swipe to open. Drag from the edge on touch. No bolting gesture libraries on top of a dialog.
  • Drag to close with velocity commit. Flick to dismiss, soft release snaps back. Native iOS and Android drawer feel.
  • Spring physics, no motion library. The animation engine is built in. Zero runtime dependencies.
  • Mouse and touch parity. The same gesture works on desktop pointers, not only mobile.
  • Multi instance per side. Two or more sidebars on the same edge with independent state.
  • Bottom sheet with mid anchor. Half-open stop and full-open stop, like native sheets.
  • Accessible. Focus trap, Escape to close, aria attributes, keyboard nav.

Full comparisons: vs Vaul (same category gesture drawer) · vs shadcn sheet (modal dialog vs drawer)

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