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

redux-react-collapse-pane

v0.15.0

Published

Install redux-react-collapse-pane: ```bash npm i redux-react-collapse-pane

Downloads

75

Readme

redux-react-collapse-pane User Guide

[demo]

Getting Started :rocket:

Install redux-react-collapse-pane:

npm i redux-react-collapse-pane

# or for yarn

yarn add redux-react-collapse-pane

Once installed you can import the CollapsePane component in your code.

import { CollapsePane } from "redux-react-collapse-pane";

Quick Start Usage

To resize your components you need to wrap it out with CollapsePane frame. The idea of this implementation of pane is to control the collapsing and resizing from the parent component. This will enable you to persist collapse pane in redux and update the pane from redux state.

The required props are:

  • childSizes - [number, number] is a proportional sizes of the splitting elements
  • collapsedSize - number is a size to which you element will be collapsed
  • onSizeChanged - ([number, number]) => void is a callback which will be called once the element sizes changed
  • collapsed - boolean is a flag which determines if the element is collapsed
  • onCollapse - () => void is a callback which will be called once the collapse button will be called
  • onExpand - () => void is a callback which will be called once the expand button will be called
    <CollapsePane
      childSizes={sizes}
      collapsedSize={100}
      onSizeChanged={(sizes: [number, number]) => onSizeChanged(sizes)}
      collapsed={collapsed}
      onCollapse={() => onCollapse()}
      onExpand={() => onExpand()}
    >
  <div>First</div>
  <div>Second</div>
</CollapsePane>

This will be vertical panel, it's left element will be collapsible.

All available options

export interface CollapsePaneProps {
    collapsed: boolean,

    /**
     * this sizes are relative
     * ex: [1,2] second element is two times bigger than the first
     */
    childSizes: [number, number];

    /** this size is absolute, and is using for collapsed element */
    collapsedSize: number;

    onSizeChanged: (sizes: [number, number]) => void;

    /** by default vertical */
    horizontal?: boolean;

    /** if horizontal inverted collapse pane will collapse left element
     *  if vertical inverted collapse pane will collapse bottom element
     */
    inverted?: boolean;

    // you can use custom collapse button
    collapseButton?: React.ReactElement;

    // you can use custom expand button
    expandButton?: React.ReactElement;

    // color of the separator line
    separatorColor?: string;

    // color of the moving separator line
    movingSeparatorColor?: string;

    // width of the separator line
    separatorWidth?: number;

    onCollapse: () => void;

    onExpand: () => void;

    /**
     * offset in % from top to bottom or from left to right, 50 is center
     */
    collapseButtonOffset?: number;

    /**
     * positions in pixels left to right and top to bottom in which the delimiter will be snapped
     */
    snapPoints?: number[];

    children: [React.ReactChild, React.ReactChild]
}