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

@sudobility/building_blocks

v0.0.111

Published

Higher-level shared UI building blocks for Sudobility apps

Readme

@sudobility/building_blocks

Higher-level shared UI building blocks for Sudobility apps. These components integrate with authentication, wallet connection, i18n, routing, and analytics tracking.

Installation

bun add @sudobility/building_blocks

Peer Dependencies

Required:

  • @sudobility/components - Base UI components
  • @sudobility/design - Design tokens and styling
  • @heroicons/react - Icon library
  • react (^18.0.0 || ^19.0.0)
  • class-variance-authority, clsx, tailwind-merge - Styling utilities

Optional (for specific features):

  • @sudobility/auth-components - For Firebase auth integration
  • @sudobility/web3-components - For wallet connection
  • @sudobility/devops-components - For status indicator
  • @sudobility/subscription-components - For pricing/subscription pages
  • @sudobility/types - For Theme, FontSize enums

Components

TopBar Components

AppTopBar (Base)

Base topbar with logo, menu items, language selector, and render prop for auth.

import { AppTopBar } from '@sudobility/building_blocks';
import { Cog6ToothIcon, DocumentTextIcon } from '@heroicons/react/24/outline';

<AppTopBar
  logo={{
    src: '/logo.png',
    appName: 'My App',
    onClick: () => navigate('/'),
  }}
  menuItems={[
    { id: 'docs', label: 'Docs', icon: DocumentTextIcon, href: '/docs' },
    { id: 'settings', label: 'Settings', icon: Cog6ToothIcon, href: '/settings' },
  ]}
  currentLanguage="en"
  onLanguageChange={(lang) => switchLanguage(lang)}
  renderAccountSection={() => <MyAuthButton />}
  LinkComponent={LocalizedLink}
/>

AppTopBarWithFirebaseAuth

TopBar with Firebase authentication via @sudobility/auth-components.

import { AppTopBarWithFirebaseAuth } from '@sudobility/building_blocks';
import { AuthAction } from '@sudobility/auth-components';

<AppTopBarWithFirebaseAuth
  logo={{ src: '/logo.png', appName: 'My App' }}
  menuItems={menuItems}
  AuthActionComponent={AuthAction}
  onLoginClick={() => navigate('/login')}
  authenticatedMenuItems={[
    { id: 'dashboard', label: 'Dashboard', onClick: () => navigate('/dashboard') },
  ]}
/>

AppTopBarWithWallet

TopBar with wallet connection via @sudobility/web3-components.

import { AppTopBarWithWallet } from '@sudobility/building_blocks';
import { WalletDropdownMenu } from '@sudobility/web3-components';

<AppTopBarWithWallet
  logo={{ src: '/logo.png', appName: 'My App' }}
  menuItems={menuItems}
  WalletDropdownMenuComponent={WalletDropdownMenu}
  isConnected={isConnected}
  walletAddress={walletAddress}
  authStatus={authStatus}
  onConnect={() => navigate('/connect')}
  onDisconnect={handleDisconnect}
  walletMenuItems={walletMenuItems}
/>

Breadcrumbs

AppBreadcrumbs

Breadcrumbs with social share and "Talk to Founder" button.

import { AppBreadcrumbs } from '@sudobility/building_blocks';

<AppBreadcrumbs
  items={[
    { label: 'Home', href: '/' },
    { label: 'Products', href: '/products' },
    { label: 'Widget', current: true },
  ]}
  shareConfig={{
    title: 'Check out this widget',
    description: 'Amazing widget for your needs',
    hashtags: ['widget', 'product'],
  }}
  talkToFounder={{
    meetingUrl: 'https://calendly.com/founder/30min',
    buttonText: 'Book a call',
  }}
/>

Footer Components

AppFooter (Compact)

Compact footer for app pages with sticky positioning.

import { AppFooter } from '@sudobility/building_blocks';
import { SystemStatusIndicator } from '@sudobility/devops-components';

<AppFooter
  version="1.0.0"
  companyName="Sudobility Inc."
  companyUrl="/"
  statusIndicator={{
    statusPageUrl: 'https://status.example.com',
  }}
  StatusIndicatorComponent={SystemStatusIndicator}
  links={[
    { label: 'Privacy', href: '/privacy' },
    { label: 'Terms', href: '/terms' },
  ]}
  onTrack={handleAnalytics}
  sticky
/>

AppFooterForHomePage (Full)

Full footer for home/landing pages with link sections.

import { AppFooterForHomePage } from '@sudobility/building_blocks';

<AppFooterForHomePage
  logo={{ appName: 'My App' }}
  linkSections={[
    {
      title: 'Product',
      links: [
        { label: 'Features', href: '/features' },
        { label: 'Pricing', href: '/pricing' },
      ],
    },
    {
      title: 'Company',
      links: [
        { label: 'About', href: '/about' },
        { label: 'Contact', href: '/contact' },
      ],
    },
  ]}
  socialLinks={{
    twitterUrl: 'https://twitter.com/myapp',
    discordUrl: 'https://discord.gg/myapp',
  }}
  version="1.0.0"
  companyName="Sudobility Inc."
  description="Building the future of web3 communication"
  onTrack={handleAnalytics}
/>

Layout

AppPageLayout

Layout wrapper combining TopBar, Breadcrumbs, Content, and Footer.

import { AppPageLayout, AppTopBarWithFirebaseAuth, AppFooter } from '@sudobility/building_blocks';

<AppPageLayout
  topBar={<AppTopBarWithFirebaseAuth {...topBarProps} />}
  breadcrumbs={{
    items: breadcrumbItems,
    shareConfig: shareConfig,
  }}
  footer={<AppFooter {...footerProps} />}
  maxWidth="7xl"
  background="default"
>
  <h1>Page Content</h1>
</AppPageLayout>

Settings Components

GlobalSettingsPage

Master-detail settings page with extensible sections.

import { GlobalSettingsPage } from '@sudobility/building_blocks';

<GlobalSettingsPage
  theme={theme}
  fontSize={fontSize}
  onThemeChange={setTheme}
  onFontSizeChange={setFontSize}
  additionalSections={[
    {
      id: 'notifications',
      icon: BellIcon,
      label: 'Notifications',
      description: 'Manage notification preferences',
      content: <NotificationSettings />,
    },
  ]}
  onTrack={handleAnalytics}
/>

Subscription Components

AppPricingPage

Public pricing page for displaying subscription options.

import { AppPricingPage } from '@sudobility/building_blocks';

<AppPricingPage
  products={subscriptionProducts}
  isAuthenticated={isLoggedIn}
  hasActiveSubscription={hasSubscription}
  currentProductIdentifier={currentPlan}
  labels={pricingLabels}
  formatters={pricingFormatters}
  entitlementMap={packageToEntitlement}
  entitlementLevels={entitlementHierarchy}
  onPlanClick={(planId) => handlePlanSelection(planId)}
  onFreePlanClick={() => navigate('/signup')}
  onTrack={handleAnalytics}
/>

Page Components

AppTextPage

Markdown/HTML content page for static content.

import { AppTextPage } from '@sudobility/building_blocks';

<AppTextPage
  title="Privacy Policy"
  content={markdownContent}
  lastUpdated="2024-01-01"
/>

AppSitemapPage

SEO-friendly sitemap page.

import { AppSitemapPage } from '@sudobility/building_blocks';

<AppSitemapPage
  sections={sitemapSections}
  LinkComponent={LocalizedLink}
/>

Analytics Tracking

All major components support optional analytics tracking via the onTrack callback:

import type { AnalyticsTrackingParams } from '@sudobility/building_blocks';

const handleAnalytics = (params: AnalyticsTrackingParams) => {
  // params.eventType: 'button_click' | 'link_click' | 'settings_change' | 'subscription_action'
  // params.componentName: 'AppFooter' | 'GlobalSettingsPage' | 'AppPricingPage'
  // params.label: 'footer_link_clicked' | 'theme_changed' | 'plan_clicked'
  // params.params: { link_href, theme, plan_identifier, ... }

  analytics.track(params.label, {
    component: params.componentName,
    ...params.params,
  });
};

<AppFooter onTrack={handleAnalytics} {...props} />
<GlobalSettingsPage onTrack={handleAnalytics} {...props} />
<AppPricingPage onTrack={handleAnalytics} {...props} />

Components with analytics support:

  • AppFooter - tracks link clicks
  • AppFooterForHomePage - tracks link clicks with section info
  • GlobalSettingsPage - tracks theme/font changes, section navigation
  • AppPricingPage - tracks plan clicks, billing period changes

Constants

Default Languages

16 languages with flags are included by default:

import { DEFAULT_LANGUAGES } from '@sudobility/building_blocks';
// ['en', 'ar', 'de', 'es', 'fr', 'it', 'ja', 'ko', 'pt', 'ru', 'sv', 'th', 'uk', 'vi', 'zh', 'zh-hant']

TypeScript Types

All props interfaces and utility types are exported:

import type {
  // Component Props
  AppTopBarProps,
  AppFooterProps,
  AppFooterForHomePageProps,
  GlobalSettingsPageProps,
  AppPricingPageProps,

  // Configuration Types
  MenuItemConfig,
  LogoConfig,
  FooterLinkSection,
  SocialLinksConfig,
  StatusIndicatorConfig,
  ShareConfig,

  // Analytics
  AnalyticsTrackingParams,
  AnalyticsEventType,

  // Layout
  MaxWidth,
  ContentPadding,
  BackgroundVariant,
} from '@sudobility/building_blocks';

Features

  • Responsive: All components support mobile with hamburger menu
  • Dark Mode: Full dark mode support via Tailwind CSS
  • i18n Ready: Language selector with 16 default languages
  • Flexible Auth: Support for Firebase auth or wallet connection
  • Analytics Ready: Optional tracking callbacks for all user interactions
  • Customizable: All components accept custom classNames and Link components
  • Tree-shakeable: ESM only, optimized for modern bundlers

License

MIT