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

@tb.p/vscode-layout

v3.0.0

Published

A reusable layout component using React, styled-components, and react-resizable-panels

Readme

@tb.p/vscode-layout

A flexible and customizable layout component inspired by VS Code's interface, built with React, styled-components, and react-resizable-panels.

Installation

npm install @tb.p/vscode-layout
# or
yarn add @tb.p/vscode-layout

Features

  • VS Code-like Interface: Provides a familiar and intuitive layout structure.
  • Resizable Panels: Easily resize different sections of the layout (Navigation, Editor, Console) using react-resizable-panels.
  • Customizable Sections: Pass your own React components to be rendered in the Header, Footer, Navigation, Editor, and Console sections.
  • Dynamic Component Rendering: Leverages React.lazy and Suspense for optimized loading of custom components.
  • Persistent Layout: Saves and restores panel sizes to/from local storage.
  • Styled with styled-components: Easily themeable and customizable using styled-components.

Usage

import React from 'react';
import Layout from '@tb.p/vscode-layout';

// Optional: Define custom components for different layout areas
const MyHeader = () => <div>Custom Header</div>;
const MyFooter = () => <div>Custom Footer</div>;
const MyNav = () => <div>Custom Navigation</div>;
const MyEditor = () => <div>Custom Editor Area</div>;
const MyConsole = () => <div>Custom Console Area</div>;

const App = () => {
  const layoutConfig = {
    header: MyHeader,
    footer: MyFooter,
    nav: MyNav,
    editor: MyEditor,
    console: MyConsole,
    // You can also pass paths for React.lazy, e.g.:
    // editor: React.lazy(() => import('./MyEditorComponent')),
  };

  return (
    <div style={{ height: '100vh' }}>
      <Layout layoutConfig={layoutConfig} />
    </div>
  );
};

export default App;

Layout Structure

The Layout component is divided into the following main sections:

  • Header: Topmost section, typically for branding or global actions.
  • Main Content Area: Contains the resizable panels.
    • Navigation Panel: Left-hand side panel, resizable.
    • Editor/Console Split Panel: Vertically split and resizable area.
      • Editor Panel: Upper panel in the split, for main content.
      • Console Panel: Lower panel in the split, often for logs or secondary information.
  • Footer: Bottommost section, typically for status information or links.

Props

| Prop | Type | Default | Description | | -------------- | ------ | ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | | layoutConfig | object | {} | An object where keys are section names (header, footer, nav, editor, console) and values are the React components to render. | | storageKey | string | 'react-resizable-panels:layout-sizes' | The key used to save and load panel sizes from local storage. |

layoutConfig Object

The layoutConfig prop allows you to specify custom components for each section of the layout. You can pass either a direct component reference or a component loaded via React.lazy.

  • header: Component for the header section.
  • footer: Component for the footer section.
  • nav: Component for the navigation panel.
  • editor: Component for the editor panel.
  • console: Component for the console panel.

Peer Dependencies

Make sure you have these packages installed in your project:

  • react: ^18.2.0
  • react-dom: ^18.2.0
  • react-router-dom: ^6.22.3
  • styled-components: ^6.1.8
  • react-resizable-panels: ^2.0.16

Keywords

  • react
  • layout
  • vscode
  • resizable
  • panels
  • ui-component

Author

JHasselbring

License

ISC