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

@john-avenue/ui

v0.3.0

Published

Dark-mode-first React component library with 70+ components — inputs, charts, trading widgets, data tables, and more.

Readme

@john-avenue/ui

Dark-mode-first React component library with 75+ components — inputs, data display, charts, trading widgets, and layout primitives. Built with TypeScript, inline styles (zero CSS dependencies), and CSS custom properties for theming.

Install

npm install @john-avenue/ui
# or
bun add @john-avenue/ui
# or
yarn add @john-avenue/ui

Peer dependencies: react >= 18 and react-dom >= 18

Quick Start

import { JohnUIProvider, Btn, Inp, Modal } from '@john-avenue/ui';

function App() {
  return (
    <JohnUIProvider>
      <Btn v="primary" onClick={() => {}}>Click me</Btn>
      <Inp placeholder="Type something..." />
    </JohnUIProvider>
  );
}

<JohnUIProvider> injects the global CSS (keyframe animations, font imports, CSS custom properties) and sets the theme. Wrap your app once at the root.

Theming

Dark & Light Mode

<JohnUIProvider mode="dark">  {/* default */}
<JohnUIProvider mode="light">

Custom Token Overrides

<JohnUIProvider tokens={{ p5: '#6366f1', bg0: '#0f0f14' }}>

Using Tokens in Your Code

import { tokens, c, mono, serif } from '@john-avenue/ui';

// tokens and c are the same object — c is shorthand
<div style={{ color: c.t1, background: c.bg1, fontFamily: mono }}>
  Hello
</div>

Components

Inputs & Controls

| Component | Description | |-----------|-------------| | Btn | Button with variants: primary, secondary, ghost, danger | | Inp | Text input with size and state support | | Textarea | Multi-line text input | | Toggle | On/off toggle switch | | Checkbox | Checkbox with label | | Radio | Radio button with label | | Slider | Range slider | | Select | Single-value dropdown | | SearchSelect | Searchable dropdown with filtering | | MultiSelect | Multi-value select with tags | | TagInput | Free-form tag entry |

Data Display

| Component | Description | |-----------|-------------| | Table | Data table with sorting, selection, and row actions | | Tag | Colored label chip | | Badge | Status badge with count | | StatusDot | Colored dot indicator | | ProgressBar | Horizontal progress indicator | | Spinner | Loading spinner | | Avatar | User avatar with fallback initials | | Kbd | Keyboard shortcut display | | Ticker | Financial ticker with price and change | | PriceCell | Price display with directional coloring | | PnLBadge | Profit/loss badge | | StatCard | Key metric card |

Layout & Navigation

| Component | Description | |-----------|-------------| | Tabs | Horizontal tab bar | | SideTabs | Vertical tab navigation | | CollapsibleSideTabs | Collapsible sidebar navigation | | TabGroup | Segmented control / button group tabs | | Accordion | Expandable content sections | | Section | Page section with heading | | Sub | Subsection with lighter heading | | SectionDivider | Horizontal divider with optional label | | PanelLayout | Sidebar + content layout | | Toolbar | Action bar with icon buttons | | GroupList | Grouped list with sections | | Card | Content card | | FlipCard | Card with front/back flip | | CardGrid | Responsive card grid | | Stepper | Step indicator | | EmptyState | Placeholder for empty content areas | | SettingRow | Label + control row for settings pages |

Overlays & Feedback

| Component | Description | |-----------|-------------| | Modal | Dialog overlay | | ConfirmModal | Confirmation dialog with actions | | StepperModal | Multi-step wizard modal | | Tooltip | Hover tooltip | | HoverCard | Rich hover popover | | DropdownMenu | Context / dropdown menu | | CmdPalette | Command palette (Cmd+K) | | Alert | Inline alert banner | | ToastProvider / useToast | Toast notification system |

Charts

All charts are pure SVG — no chart library dependencies.

| Component | Description | |-----------|-------------| | LineChart | Multi-series line chart | | AreaChart | Filled area chart | | BarChart | Vertical / horizontal bar chart | | Histogram | Distribution histogram | | ScatterPlot | Scatter plot with optional regression | | MiniSparkline | Inline sparkline | | CandlestickChart | OHLC candlestick chart | | DepthChart | Order book depth visualization | | SpreadChart | Bid-ask spread over time | | Heatmap | Color-coded grid | | CorrelationMatrix | Pairwise correlation grid | | PortfolioHeatmap | Treemap-style portfolio view |

Chart building blocks (ChartContainer, Axis, Crosshair, ChartTooltip, Legend, Overlay) are also exported for custom compositions.

Trading & Financial

| Component | Description | |-----------|-------------| | OrderBook | Bid/ask order book display | | OrderEntry | Order entry form | | PairOrderPanel | Paired order entry (buy + sell) | | TradeBlotter | Recent trades list | | PositionRow | Open position display | | LadderRow | Price ladder row | | SpreadIndicator | Bid-ask spread gauge | | ZScoreMeter | Z-score visualization | | BalanceBar | Balance distribution bar | | RiskGauge | Risk level gauge | | PairCard | Trading pair analytics card |

Misc

| Component | Description | |-----------|-------------| | Logo | John UI logo mark | | ChevronArrow | Animated chevron icon |

Sizing

Most components accept a sz prop using a 1–4 numeric scale:

| Value | Label | Use case | |-------|-------|----------| | 1 | Compact | Dense tables, toolbars | | 2 | Default | Standard UI | | 3 | Comfortable | Forms, settings | | 4 | Spacious | Hero sections |

<Btn sz={1}>Compact</Btn>
<Inp sz={3} placeholder="Comfortable" />

Design Tokens

Tokens are CSS custom properties scoped under --john-*. Access them via the tokens (or c) export:

Colors

  • p5 — Primary purple
  • p3 — Light purple
  • p7 — Dark purple
  • green, red, amber, blue, cyan, orange, yellow, teal, lime, pink — Semantic accents

Surfaces & Backgrounds

  • bg0 through bg3 — Background layers (darkest to lightest)
  • s1, s2, s3 — Surface overlays (increasing opacity)

Borders

  • b1, b2, b3 — Border opacity levels (glass-like borders)

Text

  • t1 — Primary text (93% white)
  • t2 — Secondary text (55%)
  • t3 — Tertiary text (30%)
  • t4 — Disabled text (12%)

Purple Alpha

  • pa1 through pa7 — Purple at increasing opacities (focus rings, hover states)

Fonts

  • mono'JetBrains Mono', monospace — data, prices, code
  • serif'DM Serif Display', serif — display headings

Styling

All components use inline styles — there are no CSS files, CSS modules, or utility classes. This means:

  • Zero CSS specificity conflicts
  • Works in any React setup (Next.js, Vite, CRA, Remix)
  • No build tool configuration needed
  • Easily overridable via the style prop on any component

Utility Exports

import {
  isGrouped, flatOpts, gv, gl,           // Select option helpers
  linearScale, niceScale, timeAxisTicks,  // Chart math
  formatCompact, formatCurrency,          // Number formatting
  formatPercent, formatPrice,
  extent, domainWithPadding, downsample,  // Data helpers
  chartSeriesColors,                      // Default chart palette
} from '@john-avenue/ui';

TypeScript

Fully typed. Every component exports its props interface:

import type { BtnProps, InpProps, TableProps, Column } from '@john-avenue/ui';

Browser Support

Modern browsers (Chrome, Firefox, Safari, Edge). Requires CSS custom properties support.

License

MIT