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

react-splitty

v1.0.6

Published

A React library for managing multiple viewer modals: resize, collision detection, scroll sync, and minimize.

Readme

react-splitty

A React library for managing multiple viewer modals: resize, collision detection, scroll sync, and minimize.


English

Features

  • ModalController – Manages multiple draggable/resizable modals
  • SplitLayout – Resizable split grid (rows × cols) with copy/paste layout
  • Collision detection – Optional overlap handling and redistribution
  • Scroll sync – Sync scroll position across modals in a group
  • Minimize – Minimize modals to a bar (top/bottom/left/right)

Install

npm install react-splitty

Peer dependencies: react and react-dom (>=18).

Usage

import { ModalController, useModalStore } from "react-splitty";
import "react-splitty/dist/split-viewer.css"; // if bundled; or link the CSS from node_modules

function App() {
  const addModal = useModalStore((s) => s.addModal);

  return (
    <ModalController width="100vw" height="100vh" minimizedBarPosition="bottom">
      <button
        onClick={() =>
          addModal({
            id: "m1",
            title: "Viewer 1",
            content: <div>Content</div>,
            options: { resizable: true },
          })
        }
      >
        Open modal
      </button>
    </ModalController>
  );
}

Scripts

| Command | Description | | ---------------------- | --------------------------------------- | | npm run dev | Run demo dev server | | npm run build | Build library → dist/ | | npm run build:demo | Build demo static site → dist-demo/ | | npm run preview:demo | Preview built demo (after build:demo) |

Exports

  • Components: ModalController, ModalView, MinimizedBar, SplitLayout
  • Store: useModalStore
  • Utils: createScrollSync
  • Types: see dist/index.d.ts

한국어

소개

N개의 뷰어 모달을 관리하는 React 라이브러리입니다. 리사이즈, 충돌 감지, 스크롤 동기화, 최소화를 지원합니다.

기능

  • ModalController – 여러 개의 드래그/리사이즈 가능한 모달 관리
  • SplitLayout – 행×열 리사이즈 가능 스플릿 그리드, 레이아웃 복사/붙여넣기
  • 충돌 감지 – 겹침 처리 및 재배치 옵션
  • 스크롤 동기화 – 그룹 내 모달 간 스크롤 위치 동기화
  • 최소화 – 모달을 상/하/좌/우 바로 최소화

설치

npm install react-splitty

Peer dependencies: react, react-dom (>=18).

사용 예

import { ModalController, useModalStore } from "react-splitty";
import "react-splitty/dist/split-viewer.css"; // 번들에 포함하거나 node_modules에서 CSS 링크

function App() {
  const addModal = useModalStore((s) => s.addModal);

  return (
    <ModalController width="100vw" height="100vh" minimizedBarPosition="bottom">
      <button
        onClick={() =>
          addModal({
            id: "m1",
            title: "Viewer 1",
            content: <div>Content</div>,
            options: { resizable: true },
          })
        }
      >
        모달 열기
      </button>
    </ModalController>
  );
}

스크립트

| 명령어 | 설명 | | ---------------------- | -------------------------------------- | | npm run dev | 데모 개발 서버 실행 | | npm run build | 라이브러리 빌드 → dist/ | | npm run build:demo | 데모 정적 사이트 빌드 → dist-demo/ | | npm run preview:demo | 빌드된 데모 미리보기 (build:demo 후) |

export

  • 컴포넌트: ModalController, ModalView, MinimizedBar, SplitLayout
  • 스토어: useModalStore
  • 유틸: createScrollSync
  • 타입: dist/index.d.ts 참고