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

@betterlb/ui

v0.2.2

Published

Shared UI component library for BetterLB portals

Downloads

150

Readme

@betterlb/ui

A shared UI component library for BetterLB portals (municipal and university).

Installation

npm install @betterlb/ui

Features

  • Config-driven components: No hardcoded LGU settings - pass configuration as props
  • TypeScript: Full type safety with strict mode enabled
  • Tailwind CSS: Design tokens included via CSS variables
  • Accessible: WCAG AA compliant components
  • React 19: Built for latest React with peer dependencies

Usage

1. Import Design Tokens

In your app's CSS file:

@import '@betterlb/ui/styles';

2. Configure Your LGU

Create a config object matching the LGUConfig interface:

import { LGUConfig } from '@betterlb/ui';

const config: LGUConfig = {
  lgu: {
    name: 'Los Baños',
    fullName: 'Municipality of Los Baños',
    province: 'Laguna',
    region: 'CALABARZON',
    regionCode: 'IV-A',
    type: 'municipality',
    logoPath: '/logos/your-logo.png',
    officialWebsite: 'https://losbanos.gov.ph',
    provinceWebsite: 'https://laguna.gov.ph',
  },
  portal: {
    name: 'BetterLB',
    domain: 'betterlb.ph',
    baseUrl: 'https://betterlb.ph',
    tagline: 'Your Gateway to Los Baños',
    description: 'Community-run portal',
    brandColor: '#2563eb',
    navbarTagline: 'Municipality of Los Baños',
    footerBrandName: 'BetterLB',
    footerTagline: 'For the People',
    logoWhitePath: '/logos/white-logo.png',
  },
  location: {
    coordinates: { lat: 14.1843, lon: 121.2413 },
    weather: { defaultCity: 'Los Banos' },
  },
  features: {
    openLGU: true,
    transparency: true,
    tourism: false,
    statistics: true,
  },
};

3. Use Components

import { Navbar, Footer, SidebarLayout } from '@betterlb/ui';
import { config } from './config';

function App() {
  return (
    <>
      <Navbar
        config={config}
        mainNavigation={navigation}
        languages={languages}
      />
      <main>
        {/* Your content */}
      </main>
      <Footer
        config={config}
        navigation={footerNavigation}
      />
    </>
  );
}

Components

Layout

  • Navbar: Top navigation with mobile responsive menu
  • Footer: Multi-column footer with social links
  • SidebarLayout: Admin-style layout with collapsible sidebar

UI Components

  • Button: Primary, secondary, outline, ghost, link variants
  • Card: Content cards with header, body, footer, image, avatar
  • Badge: Status indicators with color variants
  • Dialog: Modal dialogs using Radix UI
  • Tabs: Tabbed content using Radix UI
  • Pagination: Paginated list controls
  • EmptyState: Empty result states with call-to-action

Utilities

  • cn(): Merge Tailwind classes
  • formatDate(): Philippine locale date formatting
  • truncateText(): Text truncation
  • getRandomNumber(): Random number generation

Development

# Install dependencies
npm install

# Build
npm run build

# Watch mode
npm run dev

# Type check
npx tsc --noEmit

Peer Dependencies

You must install these in your project:

  • react@^19.0.0
  • react-dom@^19.0.0
  • react-router-dom@^6.22.0
  • react-i18next@^15.0.0
  • @radix-ui/react-dialog@^1.0.5
  • @radix-ui/react-tabs@^1.0.4
  • lucide-react@^0.470.0
  • @icons-pack/react-simple-icons@^13.7.0
  • clsx@^2.1.0
  • tailwind-merge@^2.2.0

License

MIT

Author

BetterLB - Community Open Source Initiative