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

@upbound/ux

v0.0.2

Published

Complex UX components reusable across applications

Readme

@upbound/ux

Complex UX components that combine primitives with business logic, API calls, and state management.

Installation

yarn add @upbound/ux
# or
npm install @upbound/ux

Note: This package depends on @upbound/elements and @tanstack/react-query. Make sure to import the elements styles and wrap your application with a QueryClientProvider.

Usage

1. Import Styles (Required)

This package uses components from @upbound/elements, so you must include the base styles:

/* In your main CSS file */
@import '@upbound/elements/styles.css';

Or in JavaScript:

// In your _app.tsx or root layout
import '@upbound/elements/styles.css';

2. Set Up QueryClientProvider (Required)

This package uses TanStack Query for data fetching. Wrap your application with a QueryClientProvider:

// In your _app.tsx or root layout
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';

const queryClient = new QueryClient();

function App({ children }) {
  return <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>;
}

3. Configure Framework-Specific Components (Optional)

Components in this package use @upbound/elements primitives which render standard <a> and <img> elements by default. If you're using Next.js and want optimized routing/images, wrap your app with ElementsProvider:

// In your _app.tsx or root layout
import { ElementsProvider } from '@upbound/elements';
import Link from 'next/link';
import Image from 'next/image';

function App({ children }) {
  return (
    <ElementsProvider Link={Link} Image={Image}>
      {children}
    </ElementsProvider>
  );
}

This step is optional — without the provider, all components work with standard HTML elements.

4. Import Components

import { GlobalNav, DocumentationButton, OpenDrawerButton } from '@upbound/ux';

function App() {
  return (
    <GlobalNav
      context={navigationContext}
      navigationProps={{
        left: <OpenDrawerButton />,
        right: <DocumentationButton />,
      }}
    >
      {children}
    </GlobalNav>
  );
}

When to Add Components Here

Add a component to this package if:

  1. ✅ It's needed across multiple applications
  2. ✅ It's more than a primitive element (button, input, dropdown, etc.)
  3. ✅ It wraps primitives with network calls or complex calculations
  4. ✅ It contains business logic specific to Upbound products

If your component is a simple, reusable primitive without business logic, consider adding it to @upbound/elements instead.

Available Exports

All exports are available from the main entry point:

import { GlobalNav, CreateCheckoutButton, ... } from '@upbound/ux';

Components

| Export | Description | | ------------------------ | -------------------------------------------------------------------------- | | GlobalNav | Main navigation component with drawer, navigation tree, and upsell support | | GlobalNavCore | Core navigation component without the MainDrawerProvider wrapper | | GlobalNavSystemStatus | System status indicator that fetches and displays Upbound status | | SystemStatusDot | Visual status dot indicator (green/yellow/orange/red/blue) | | CreateCheckoutButton | Button that initiates Stripe checkout session for plan upgrades | | UsageOverTimeAreaChart | Chart component displaying usage metrics over time (area/bar, cumulative) | | DocumentationButton | Navigation link button to Upbound documentation | | FreeCreditsButton | Upsell button with popover for free credits promotion | | OpenDrawerButton | Button that opens the main navigation drawer | | RequestFeatureButton | Button that opens Intercom for feature requests | | ContactUsButton | Button that opens Intercom for support contact |

Hooks & Utilities

| Export | Description | | --------------------------- | ---------------------------------------------------------------------- | | generateNavigationTree | Generates navigation tree structure based on user tier and permissions | | footerLinks | Predefined footer links array for the navigation drawer | | useStatusData | Hook to fetch system status from Upbound status page | | getStatusIndicator | Utility to normalize status indicator strings to SystemStatus type | | computeNonCumulativeUsage | Computes daily (non-cumulative) usage data for charts | | computeCumulativeUsage | Computes cumulative usage data for charts |

Types

| Export | Description | | ----------------------------- | -------------------------------------------------------------------------------------- | | GlobalNavProps | Props for GlobalNav and GlobalNavCore components | | CreateCheckoutButtonProps | Props for CreateCheckoutButton component | | UsageOverTimeAreaChartProps | Props for UsageOverTimeAreaChart component | | FreeCreditsButtonProps | Props for FreeCreditsButton component | | MetricData<T> | Generic type for chart metric data with date and values | | StatusPageResponse | Type for status page API response | | SystemStatus | Union type: 'none' \| 'critical' \| 'major' \| 'minor' \| 'maintenance' \| 'unknown' | | SystemStatusDotProps | Props for SystemStatusDot component |

Development

Develop components in isolation with Storybook:

cd packages/ux
yarn storybook

Add a .stories.tsx file for each component to enable isolated development with mocked API calls and providers.

Build the package:

yarn build

Dependencies

This package depends on:

  • @upbound/elements — Primitive UI components and styles
  • @upbound/api — API client and types
  • @upbound/utils — Shared utility functions
  • @tanstack/react-query — Data fetching and caching (requires a QueryClientProvider in your app)