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

multi-panel

v1.5.0

Published

A front-end component that supports dynamic area segmentation and nesting of multiple panels.

Readme

Features

  • Dynamic Panel Splitting: Support for both horizontal and vertical splitting with draggable splitters.
  • Nested Layouts: MultiPanel can be nested within another MultiPanel to create complex layouts.
  • Customizable Sizes: Set initial sizes, minimum sizes, and default sizes for each panel.
  • Theme Support: Built-in light and dark themes, or provide a custom theme object.
  • Event Callbacks: Get notified when panel sizes change.
  • Pixel Precision: Control over splitter width and panel minimum sizes in pixels.

Installation

npm i multi-panel
yarn add multi-panel

Basic Usage

Double Panel

function App() {
  return (
    <div style={{ width: "100vw", height: "100vh" }}>
      <MultiPanel direction="horizontal">
        <Panel style={{ backgroundColor: "#f5f5f5" }}>Left Panel</Panel>
        <Panel style={{ backgroundColor: "#e6f7ff" }}>Right Panel</Panel>
      </MultiPanel>
    </div>
  );
}

Nested Use

<MultiPanel direction="horizontal">
  <MultiPanel direction="vertical">
    <Panel>Top-Left Panel</Panel>
    <Panel>Bottom-Left Panel</Panel>
  </MultiPanel>
  <MultiPanel direction="vertical">
    <Panel>Top-Right Panel</Panel>
    <Panel>Bottom-Right Panel</Panel>
  </MultiPanel>
</MultiPanel>

How It Works

┌────────────────────────────────────────┐
│          Initial State (Equal)         │
├─────────────┬─────────────┬────────────┤
│     33%     │     33%     │     33%    │
│   Panel 1   │   Panel 2   │   Panel 3  │
└─────────────┴─────────────┴────────────┘
        User Drags Splitter ↓
┌────────────────────────────────────────┐
│          After Dragging                │
├───────────┬───────────────┬────────────┤
│    25%    │      45%      │    30%     │
│  Panel 1  │   Panel 2     │  Panel 3   │
└───────────┴───────────────┴────────────┘

API

MultiPanel Props

| Prop | Type | Default | Description | | ------------------- | -------------------------------------- | -------------- | ----------------------------------------- | | direction | 'horizontal' \| 'vertical' | 'horizontal' | Split direction | | initialSizes | number[] | Equal division | Initial size array (in pixels) | | minSize | number | 50 | Global minimum size in pixels | | splitterSize | number | 2 | Splitter width in pixels | | theme | 'light' \| 'dark' \| MultiPanelTheme | 'light' | Theme configuration | | onPaneSizesChange | (sizes: number[]) => void | - | Callback function when panel sizes change | | style | React.CSSProperties | - | Custom container styles |

Panel Props

| Prop | Type | Default | Description | | ------------- | --------------------- | ------- | ---------------------------------- | | minSize | number | 10 | Panel minimum size (in percentage) | | defaultSize | number | - | Panel default size (in percentage) | | style | React.CSSProperties | - | Custom panel styles |

Predefined Themes

const MultiPanelThemes = {
  light: {
    splitterColor: "#e8e8e8",
    splitterHoverColor: "#d9d9d9",
    splitterActiveColor: "#e8e8e8",
  } as MultiPanelTheme,
  dark: {
    splitterColor: "#434343",
    splitterHoverColor: "#595959",
    splitterActiveColor: "#434343",
  } as MultiPanelTheme,
};