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

@trops/dash-react

v1.0.33

Published

A Dashboard Generator Package.

Readme

dash-react

dash-react is a React UI component library for building dashboards. It provides a curated set of reusable components, theming support, and essential hooks for dashboard applications.

What's Included

  • Core UI Components: Button, Panel, Modal, Menu, Container, and more
  • Layout Components: LayoutContainer, MainLayout, Workspace, Widget
  • Context Hooks: ThemeContext, WidgetContext for component communication
  • Theming: Built-in theme tokens and customization via Tailwind CSS
  • Utilities: Colors, strings, CSS helpers, and other shared utilities

Requirements

  • Node.js + npm

Installation

npm install

Common Commands

npm run storybook
npm run build-storybook
npm run build
npm run build:css
npm run prod

Maintainer Guide

Updating Components

  1. Edit component files under:

    • src/Common/ - Core UI components (Button, Panel, Modal, etc.)
    • src/Layout/ - Layout primitives (LayoutContainer, etc.)
    • src/Context/ - Context providers (ThemeContext, WidgetContext)
    • src/Utils/ - Helper utilities (colors, strings, CSS utilities)
  2. If Tailwind styles change, rebuild CSS:

npm run build:css

Testing Components with Storybook

View component changes interactively:

npm run storybook

Build static Storybook for CI/deployment:

npm run build-storybook

Publishing Updates

To release a new version:

npm version patch        # or minor/major
npm run prod             # Builds and creates package
git push origin main

Component Overview

Layout Components

  • LayoutContainer - Flexible row/column container for dashboard layouts
  • MainLayout / MainSection / MainContent - Page-level layout structure
  • Container - Generic container with spacing utilities
  • Header / SubHeader / Footer - Header and footer sections
  • Panel - Styled card/panel container
  • DashPanel - Dashboard-specific panel wrapper

Interactive Components

  • Button / ButtonIcon - Action buttons
  • Menu / MenuItem - Dropdown and list menus
  • Toggle - Toggle switch input
  • Modal - Modal overlay dialogs
  • SlidePanelOverlay - Side panel overlay
  • Tag - Label/tag component

Feedback & Layout

  • Notification / NotificationCancel - Alert notifications
  • ErrorBoundary / ErrorMessage - Error handling UI
  • Widget - Base widget wrapper
  • Workspace - Widget container with context support

Content & Utilities

  • CodeEditor / CodeRenderer - Code input and display
  • Form - Form input utilities
  • Text - Typography helpers
  • Draggable - Drag-and-drop helpers

Theming

Components use ThemeContext to access theme tokens:

import { useTheme } from "@dash/Context";

const MyComponent = () => {
    const { currentTheme } = useTheme();
    return <div className={currentTheme["bg-primary"]}>{/* ... */}</div>;
};

Available theme tokens:

  • bg-* - Background colors (primary, secondary, danger, etc.)
  • text-* - Text colors
  • border-* - Border colors
  • Variants: very-light, light, medium, dark, very-dark

Styling Components

Override component styles with common props:

<Panel
    backgroundColor="bg-blue-100"
    borderColor="border-blue-300"
    padding="p-6"
/>

Using Context Hooks

The library provides two context hooks:

// Access theme tokens and colors
import { useTheme } from "@dash/Context";
const { currentTheme } = useTheme();

// Access widget instance metadata (when inside a widget)
import { useWidgetContext } from "@dash/Context";
const { uuid, selectedProviders } = useWidgetContext();

Documentation

For component library documentation, see docs/INDEX.md.

Using dash-react in an application?

  • See the @trops/dash Electron dashboard application for a complete example
  • Dash Documentation - Widget development, provider system, and application architecture

Support

For questions or issues: [email protected]