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

@darksnow-ui/structure

v1.1.1

Published

Layout structure components for DarkSnow UI

Readme

@darksnow-ui/structure

Pure layout structure components for DarkSnow UI that provide two fundamental layout patterns for building modern web applications. These components focus exclusively on structural layout, with no imposed visual styles.

Installation

npm install @darksnow-ui/structure

Overview

This package provides two complementary layout structures:

  • PageStructure - Traditional top-to-bottom layout ideal for dashboards, admin panels, and websites
  • AppStructure - IDE/Editor style layout perfect for complex applications and development tools

Quick Start

import { PageStructure, AppStructure } from "@darksnow-ui/structure"
import "@darksnow-ui/structure/css"

// Traditional dashboard layout
<PageStructure
  header={<Header />}
  navbar={<Navigation />}
  leftSidebar={<Sidebar />}
  main={<MainContent />}
  footer={<Footer />}
/>

// IDE-style layout
<AppStructure
  activityBar={<ActivityBar />}
  primarySidebar={<FileExplorer />}
  header={<TabBar />}
  main={<Editor />}
  bottomPanel={<Terminal />}
  statusBar={<StatusBar />}
/>

Layout Comparison

PageStructure

Traditional top-to-bottom flow with optional sidebars:

┌─────────────────────────────────┐
│          Header                 │
├─────────────────────────────────┤
│          Navbar                 │
├─────┬─────────────────┬─────────┤
│Left │   Main Content  │  Right  │
│Side │                 │  Side   │
│bar  │                 │  bar    │
├─────┴─────────────────┴─────────┤
│          Footer                 │
└─────────────────────────────────┘

AppStructure

IDE-style layout with activity bar and panels:

┌──┬──────────┬─────────────────────┬──────────┐
│  │          │     Header          │          │
│A │ Primary  ├─────────────────────┤Secondary │
│c │ Sidebar  │   Main Content      │ Sidebar  │
│t │          ├─────────────────────┤          │
│i │          │   Bottom Panel      │          │
├──┴──────────┴─────────────────────┴──────────┤
│                Status Bar                     │
└───────────────────────────────────────────────┘

When to Use

Use PageStructure for:

  • Admin dashboards
  • E-commerce sites
  • Documentation sites
  • Marketing pages
  • Traditional web applications
  • Content-focused layouts

Use AppStructure for:

  • Code editors
  • Design tools
  • Complex productivity apps
  • Multi-panel applications
  • IDE-like interfaces
  • Tool-heavy applications

Props

PageStructure Props

| Prop | Type | Default | Description | | ----------------- | --------- | ------- | ---------------------------------- | | header | ReactNode | - | Header content | | navbar | ReactNode | - | Navigation bar below header | | main | ReactNode | - | Main content (required) | | secondaryMain | ReactNode | - | Secondary main for split views | | leftSidebar | ReactNode | - | Left sidebar content | | rightSidebar | ReactNode | - | Right sidebar content | | footer | ReactNode | - | Footer content | | beforeMain | ReactNode | - | Content before main | | afterMain | ReactNode | - | Content after main | | className | string | - | Container CSS classes | | fullScreen | boolean | false | Fill entire viewport (100vh/100vw) | | resizable | boolean | false | Enable resizable panels | | leftSidebarWidth | string | 'w-64' | Left sidebar width | | rightSidebarWidth | string | 'w-64' | Right sidebar width |

AppStructure Props

| Prop | Type | Default | Description | | --------------------- | --------- | ------- | -------------------------- | | activityBar | ReactNode | - | Leftmost vertical bar | | primarySidebar | ReactNode | - | Primary sidebar | | header | ReactNode | - | Header (content area only) | | main | ReactNode | - | Main content (required) | | secondarySidebar | ReactNode | - | Secondary sidebar | | bottomPanel | ReactNode | - | Bottom panel | | statusBar | ReactNode | - | Status bar | | beforeMain | ReactNode | - | Content before main | | afterMain | ReactNode | - | Content after main | | className | string | - | Container CSS classes | | resizable | boolean | false | Enable resizable panels | | activityBarWidth | string | 'w-12' | Activity bar width | | primarySidebarWidth | string | 'w-64' | Primary sidebar width | | secondarySidebarWidth | string | 'w-64' | Secondary sidebar width | | bottomPanelHeight | string | 'h-64' | Bottom panel height |

Styling and Customization

These components are design-agnostic and come with no visual styling. They only provide the structural layout (flexbox, overflow, dimensions). You have complete control over the appearance.

Using className Props

Each section supports a className prop for adding your own styles:

<AppStructure
  activityBar={<ActivityBar />}
  activityBarClassName="bg-gray-900 border-r border-gray-700"
  primarySidebar={<FileExplorer />}
  primarySidebarClassName="bg-gray-800 border-r border-gray-700"
  main={<Editor />}
  mainClassName="bg-gray-900"
  className="h-screen bg-gray-950"
/>

Using CSS Classes

All sections have BEM-style class names that you can target with CSS:

/* Horizontal Structure */
.ds-structure-horizontal__activity-bar {
  background-color: #1a1a1a;
  border-right: 1px solid #333;
}

.ds-structure-horizontal__primary-sidebar {
  background-color: #252525;
  border-right: 1px solid #333;
}

/* Vertical Structure */
.ds-structure-vertical__header {
  background-color: white;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ds-structure-vertical__left-sidebar {
  background-color: #f9fafb;
  border-right: 1px solid #e5e7eb;
}

Responsive Design

The components include basic responsive behavior (hiding sidebars on mobile). You can override or extend this:

@media (max-width: 768px) {
  .ds-structure-horizontal__activity-bar {
    /* Custom mobile styles */
    position: fixed;
    z-index: 50;
  }
}

Examples

Dashboard Layout with Styling

function Dashboard() {
  return (
    <PageStructure
      header={<AppHeader />}
      headerClassName="bg-white border-b border-gray-200 shadow-sm"
      navbar={<MainNavigation />}
      navbarClassName="bg-gray-50 border-b border-gray-200"
      leftSidebar={<DashboardSidebar />}
      leftSidebarClassName="bg-gray-50 border-r border-gray-200"
      main={<DashboardContent />}
      mainClassName="bg-white"
      className="h-screen bg-gray-100"
    />
  );
}

Dark Mode IDE Layout

function CodeEditor() {
  return (
    <AppStructure
      activityBar={<ActivityIcons />}
      activityBarClassName="bg-gray-900 border-r border-gray-800"
      primarySidebar={<FileExplorer />}
      primarySidebarClassName="bg-gray-850 border-r border-gray-800"
      header={<OpenTabs />}
      headerClassName="bg-gray-800 border-b border-gray-700"
      main={<EditorPane />}
      mainClassName="bg-gray-900"
      bottomPanel={<Terminal />}
      bottomPanelClassName="bg-gray-850 border-t border-gray-800"
      statusBar={<StatusInfo />}
      statusBarClassName="bg-gray-950 border-t border-gray-800"
      className="h-screen bg-gray-900 text-gray-100"
    />
  );
}

Full Screen PageStructure (IDE-like with top header)

function IDEWithTopHeader() {
  return (
    <PageStructure
      fullScreen // Makes layout fill entire viewport
      header={<GlobalHeader />}
      leftSidebar={<FileExplorer />}
      main={<Editor />}
      rightSidebar={<Properties />}
      footer={<StatusBar />}
      stickyHeader
      stickyLeftSidebar
      stickyRightSidebar
      className="bg-gray-900 text-gray-100"
      containerClassName="w-full h-full"
    />
  );
}

With Theme System

// Using CSS variables for theming
function ThemedLayout() {
  return (
    <PageStructure
      header={<Header />}
      headerClassName="bg-theme-surface border-b border-theme-border"
      leftSidebar={<Sidebar />}
      leftSidebarClassName="bg-theme-surface-alt border-r border-theme-border"
      main={<Content />}
      mainClassName="bg-theme-background"
      className="h-screen"
    />
  );
}

Split View Examples

// Email client with preview
function EmailClient() {
  return (
    <PageStructure
      header={<EmailHeader />}
      leftSidebar={<FolderList />}
      main={<EmailList />}
      secondaryMain={<EmailPreview />}
      mainClassName="w-1/3 border-r"
      secondaryMainClassName="w-2/3"
    />
  );
}

// Code diff viewer
function DiffViewer() {
  return (
    <PageStructure
      header={<DiffControls />}
      main={<OriginalCode />}
      secondaryMain={<ModifiedCode />}
      mainClassName="w-1/2"
      secondaryMainClassName="w-1/2"
    />
  );
}