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

@itsneufox/dockshift

v0.1.2

Published

A touch-friendly React dock that expands into a drawer.

Readme

Dockshift

A dock that opens into a drawer. Dockshift keeps a compact, useful dock on screen and expands that same surface into a full navigation drawer when pressed or dragged from anywhere on the dock or drawer surface.

It is a React component with touch and mouse dragging, a controlled state API, keyboard support, reduced-motion styles, and CSS that can be themed without bringing in a design system.

Install

npm install @itsneufox/dockshift

It needs react and react-dom 18.2 or newer in your project.

Import the default stylesheet once in your application:

import { Dockshift } from '@itsneufox/dockshift';
import '@itsneufox/dockshift/styles.css';

Use

import { useState } from 'react';
import { Dockshift } from '@itsneufox/dockshift';
import '@itsneufox/dockshift/styles.css';

export function Navigation() {
  const [open, setOpen] = useState(false);

  return (
    <Dockshift
      open={open}
      onOpenChange={setOpen}
      title="Navigation"
      description="Choose a destination."
      handleLabel="Open navigation"
      dockLabel="Quick navigation"
      dock={
        <div className="my-dock-items">
          <button type="button">Home</button>
          <button type="button">Search</button>
          <button type="button">Profile</button>
        </div>
      }
    >
      <nav aria-label="All destinations" className="my-drawer-content">
        <a href="/projects">Projects</a>
        <a href="/activity">Activity</a>
        <a href="/settings">Settings</a>
      </nav>
    </Dockshift>
  );
}

The dock prop is the compact resting state. children are the expanded drawer. The component owns the handle, overlay, drag gesture, and accessibility semantics; the application owns navigation and content.

Vertical dragging can start anywhere on the dock or drawer, while taps continue to activate controls. Scrollable drawer content and form controls keep their normal interactions. Add data-dockshift-no-drag to another custom control if its own pointer gesture should not move the sheet.

Sizing and theming

<Dockshift
  open={open}
  onOpenChange={setOpen}
  collapsedHeight="6.25rem"
  expandedHeight="min(90dvh, 50rem)"
  dockHeight="4rem"
  handleHeight="2.25rem"
  maxWidth="30rem"
  title="Navigation"
  handleLabel="Open navigation"
  dockLabel="Quick navigation"
  dock={<div className="my-dock-items"><button type="button">Home</button></div>}
  style={{
    '--dockshift-surface': '#fcfbf8',
    '--dockshift-text': '#273128',
    '--dockshift-border': 'rgba(42, 54, 43, 0.1)',
    '--dockshift-handle-color': '#b4b8b0',
    '--dockshift-backdrop-color': 'rgba(27, 35, 29, 0.28)',
    '--dockshift-focus': '#527d64',
  }}
>
  <nav aria-label="All destinations" className="my-drawer-content">
    <a href="/projects">Projects</a>
    <a href="/activity">Activity</a>
    <a href="/settings">Settings</a>
  </nav>
</Dockshift>

Available CSS variables include --dockshift-surface, --dockshift-text, --dockshift-border, --dockshift-shadow, --dockshift-radius, --dockshift-handle-color, --dockshift-backdrop-color, --dockshift-backdrop-blur, --dockshift-focus, and --dockshift-z-index.

Use classNames to add classes to the sheet, backdrop, handle zone, handle, content, or dock without replacing the built-in behavior.

Development

npm ci
npm run dev        # interactive demo
npm run typecheck
npm run build      # package JavaScript and TypeScript declarations
npm run build:demo
npm publish        # builds first through prepack

For a real phone on the same Wi-Fi, start Vite with npm run dev -- --host 0.0.0.0 and open the Mac's LAN address on the phone.

The demo is a small city-guide app in which every dock and drawer destination works. On a phone it fills the screen; on wide screens it runs at a real phone width inside a device frame, beside an introduction and a panel for trying the theme, accent, corner radius, dock height and backdrop blur live, with the matching Dockshift code. It follows the system's light or dark mode. It is a static Vite site, and its relative asset paths work at a GitHub Pages project URL such as https://username.github.io/repository/. The included .github/workflows/pages.yml builds and deploys it when this folder is the root of its own GitHub repository. In that repository, set Settings → Pages → Build and deployment → Source to GitHub Actions.

The package is currently version 0.1.2. The project uses the repository's MPL-2.0 license and Radix Dialog for dialog semantics and overlay behavior.