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

@sakit-sa/react-master-detail

v1.0.14

Published

This is a master-detail component for React

Readme

@sakit-sa/react-master-detail

Simple, easy master-detail for React

NPM JavaScript Style Guide

Live Playground

For examples of the react-master-detail in action, go to https://abdilar.github.io/react-master-detail.

OR

To run that demo on your own computer:

  • Clone this repository
  • npm install
  • npm run storybook
  • Visit http://localhost:6006/

Getting Started

Install

npm install @sakit-sa/react-master-detail

Usage

import React from 'react';

import MasterDetail from '@sakit-sa/react-master-detail';
import '@sakit-sa/react-master-detail/dist/index.css';

const App = () => (
  <MasterDetail>
    <div>
      <div>Master header</div>
      <div>Master body</div>
    </div>
    <div>
      <div>Detail header</div>
      <div>Detail body</div>
    </div>
  </MasterDetail>
);

Props

Name | Type | Default | Description -----|------|-------|----- adjustable|boolean|true|Boolean value to control whether can adjust the master and the detail sections. canClose|boolean|true|Boolean value to control whether can close detail section. centerAlign|boolean|true|Boolean value to control whether can aligns master section in the center. className|object|{}|Apply a className to the control defaultMasterWidth|number|600px|Set initial width of master section. detailMinWidth|string number object|550px|Set minimum width of detail section. direction|string|ltr|Is the master-detail direction (right-to-left or left-to-right) id|string|master-detail-[randomNumber(10000)]|The unique identifier for the component. masterMinWidth|string number object|400px|Set minimum width of master section. masterWidth|string number object|600px|Set width of master section. noDetail|boolean|false|Boolean value to control whether to show details section (Affects showDetail property). renderAdjustIcon|element|<i className="icon-align" />|Custom adjust icon renderCloseIcon|element|<i className="icon-close" />|Custom close icon showDetail|boolean|true|Boolean value to control whether show detail section. onClose|function|-|Trigger when detail section closed.

className Token

align alignIcon detail detailBody detailHeader detailWrapper masterBody masterHeader masterWrapper wrapper

See examples for more information (go to https://abdilar.github.io/react-master-detail/?path=/story/theme--class-name)

masterWidth Token

Type | Description | example -----|-------------|-------- number | Based on px | masterWidth={500} string | Either based on percentage or based on pixel | masterWidth="30%" masterWidth="500px" object | For responsive mode | masterWidth = { xxdt: "40%", xdt: "400px", dt: 300, mdt: 200 };

masterMinWidth Token

Type | Description | example -----|-------------|-------- number | Based on px | masterMinWidth={500} string | Either based on percentage or based on pixel | masterMinWidth="30%" masterWidth="500px" object | For responsive mode | masterMinWidth = { xxdt: "40%", xdt: "400px", dt: 300, mdt: 200 };

detailMinWidth Token

Type | Description | example -----|-------------|-------- number | Based on px | detailMinWidth={500} string | Either based on percentage or based on pixel | detailMinWidth="30%" masterWidth="500px" object | For responsive mode | detailMinWidth = { xxdt: "40%", xdt: "400px", dt: 300, mdt: 200 };

Responsive Mode Tips

xxdt: Affects device widths of 1920px and larger.
xdt: Affects device widths of 1600px and larger.
dt: Affects device widths of 1200px and larger.
mdt: Affects device widths of 960px and larger.

License

MIT © Saeed Abdilar