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

panelshow

v1.0.0

Published

A floating panel library for React

Readme

Panelshow

A modern React library for creating draggable panels with docking and snapping functionality. Perfect for building desktop-like interfaces, dashboard layouts, and complex multi-window applications.

Features

  • Floating panels - Create draggable windows that float above your content
  • Smart docking - Panels can snap to designated dock areas
  • TypeScript support - Fully typed API for better development experience
  • Lightweight - Minimal bundle size with zero external dependencies
  • Performance focused - Optimized rendering and state management

Installation

npm install panelshow

Quick Start

import React from "react";
import { createPanels, DragArea } from "panelshow";

// Create a panels instance
const panels = createPanels();

// Create a panel
const myPanel = panels.createPanel({
  content: (
    <div>
      <DragArea>
        <h3>Title Bar</h3>
      </DragArea>
      <div>
        <p>Panel content</p>
      </div>
    </div>
  ),
});

function App() {
  return (
    <div>
      {/* Render the panels container */}
      <panels.container />
    </div>
  );
}

export default App;

API Reference

createPanels(config)

Creates a new panels instance with the specified configuration.

Parameters:

  • config (optional): Configuration object
    • borderSize (string): Size of panel resize borders (default: '0.5rem')
    • snapClassName (object): CSS classes for snap areas

Returns: Panels

Panels Class

Methods

  • createPanel(options) - Create a new panel
  • createDockArea(options) - Create a new dock area

Properties

  • container - React component that renders all panels

Panel Class

Methods

  • open() - Show the panel
  • close() - Hide the panel
  • dock(area) - Dock panel to a specific area
  • undock() - Remove panel from dock area

Properties

  • dockArea - Currently docked area (if any)

Hooks

  • useDockArea() - React hook to get current dock area

usePanel() Hook

Get the current panel instance within a panel component.

import { usePanel } from "panelshow";

function PanelContent() {
  const panel = usePanel();

  return <button onClick={() => panel.close()}>Close Panel</button>;
}

DragArea Component

A component that makes its content draggable. Should be used within panel content to create drag handles.

import { DragArea } from "panelshow";

<DragArea className="drag-handle">
  <h3>Drag me!</h3>
</DragArea>;

Examples

Basic Panel with Header

const headerPanel = panels.createPanel({
  content: (
    <div className="panel">
      <DragArea className="panel-header">
        <h3>My Panel</h3>
        <button onClick={() => headerPanel.close()}>×</button>
      </DragArea>
      <div className="panel-body">
        <p>Panel content</p>
      </div>
    </div>
  ),
});

Fullscreen snapping

// Create a dock area
const maximiseArea = panels.createDockArea({
  at: {
    width: "100%",
    height: "100%"
  },
  snaps: [{
    y: "0",
    width: "100%"
  }]
});

...

// Maximise the panel
panel.dock(maximiseArea);

Development

# Clone the repository
git clone https://github.com/jamacz/panelshow.git
cd panelshow

# Install dependencies
npm install

# Build the library
npm run build

# Run linting
npm run lint

# Format code
npm run format

License

MIT © jamacz

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Issues

If you find any issues or have feature requests, please open an issue on GitHub.

To-do list

  • Forcing panels to stay on the screen on window resize or dragging out of the container
  • Order of panels in which they were opened (for a navbar)