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

@bota-apps/react-components

v0.11.1

Published

The app-runtime React layer for @bota-apps apps: theme/toast/error-boundary providers, the AppShell chrome, page containers with unified page state, typed route links, breadcrumbs, feature-tree navigation, the feature bridge (FeaturePageGuard/FeatureCard)

Downloads

4,090

Readme

@bota-apps/react-components

The app-runtime React layer shared by every authenticated @bota-apps app. It wires auth + data + feature providers and the app chrome around the context-free primitives in @bota-apps/react-ui. Apps pass their config/router/nav in, so a fix here applies everywhere instead of being copied into each app.

Install

pnpm add @bota-apps/react-components
# peers: react, react-dom, @tanstack/react-query

react, react-dom, and @tanstack/react-query are peer dependencies. This package builds on @bota-apps/react-ui, @bota-apps/auth-client, @bota-apps/fm, @bota-apps/hooks, and @bota-apps/gql-client, and routes with @tanstack/react-router.

Usage

The provider stack

createAppRoot composes the whole authenticated provider tree in one call. The only per-app inputs are its clients, router, and feature registry — the tree is identical everywhere:

import { createRoot } from "react-dom/client";
import { createAppRoot } from "@bota-apps/react-components";

const { AppRoot } = createAppRoot({
  authClient, // AuthClient   — from @bota-apps/auth-client
  graphqlClient, // GraphQLClient — from @bota-apps/gql-client
  router, // AnyRouter     — the app's own TanStack router
  featureRegistry, // FeatureRegistry — from @bota-apps/fm
  appearance: {
    // optional AppearanceConfig — presets the app ships CSS for, defaults, storage key
  },
});

createRoot(document.getElementById("root")!).render(<AppRoot />);

The composed tree is:

ErrorBoundary
  FeatureProvider          resolves the feature tree
    FeatureScopeProvider   ambient app scope (never empty)
      QueryProvider        React Query
        GraphQLProvider    cookie-credentialed graphql-request client
          AuthProvider     session bootstrap via the auth client
            AppearanceProvider   mode / brand / shell layout
              RouterProvider (context: auth, queryClient) + Toasts

App chrome

AppShell is the authenticated chrome — fully app-agnostic, with the per-app title and nav supplied as props and the look driven by the ambient AppearanceProvider:

import { AppShell, type NavItemDef } from "@bota-apps/react-components";

const navItems: NavItemDef[] = [/* per-app nav (each app owns its own navItems.ts) */];

<AppShell title="Acme" navItems={navItems} headerActions={appHeaderControls}>
  {children}
</AppShell>;

Individual chrome controls can also be mounted directly: AppShellLayout (layout="sidebar" | "topnav"), NavList, ThemeToggle, PresetSelect, LayoutToggle, DensityToggle, LanguageToggle, UserMenu, OrgSwitcherMenu.

Appearance

AppearanceProvider / useAppearance own a single persisted preference that bundles an appearance preset (brand tokens + shell layout + density) with the personal light/dark mode. PresetSelect applies a whole look with one pick; ThemeToggle flips only light/dark.

import { useAppearance } from "@bota-apps/react-components";

const { mode, toggleMode, preset, applyPreset } = useAppearance();

Routing surfaces

Typed route links and route-level UI wrap @tanstack/react-router:

import { RouteLink, Breadcrumbs, NotFound, RouteError } from "@bota-apps/react-components";

<RouteLink to="/users/$id" params={{ id }}>
  View user
</RouteLink>;

<Breadcrumbs variant="pill" />;

Page machinery

PageContainer renders a page's unified state (loading / error / empty / content) so pages don't re-implement it; SuspensePageContainer is the Suspense variant, and derivePageState computes the state from query results.

import { PageContainer, SuspensePageContainer, derivePageState } from "@bota-apps/react-components";

Feature bridge

FeaturePageGuard gates a page on a feature being enabled, and FeatureCard renders a feature entry — both bridging @bota-apps/fm into the UI.

import { FeaturePageGuard, FeatureCard } from "@bota-apps/react-components";

Entity audit log

EntityAuditLog renders a generic, API-owned audit trail for any entity:

import { EntityAuditLog } from "@bota-apps/react-components";

<EntityAuditLog entries={auditEntries} />;

Subpaths

| Import | What | | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | @bota-apps/react-components | The full app-runtime surface: createAppRoot, AppShell + chrome (NavList, ThemeToggle, PresetSelect, LayoutToggle, DensityToggle, LanguageToggle, UserMenu, OrgSwitcherMenu), providers (AppearanceProvider/useAppearance, ErrorBoundary, Toasts/toast), routing (RouteLink, Breadcrumbs, NotFound, RouteError), page machinery (PageContainer, SuspensePageContainer, derivePageState), the feature bridge (FeaturePageGuard, FeatureCard), navigation, actions, and EntityAuditLog |

This package ships a single entry point — everything is exported from the package root.

Part of the @bota-apps packages monorepo.