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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@ukpc-lib/react

v0.16.11

Published

React components library

Downloads

2,855

Readme

@ukpc-lib/react

@ukpc-lib is a comprehensive npm library designed to provide a suite of reusable components, themes, colors, hooks, and auth providers for UKPC applications. It aims to streamline development and ensure consistency across different projects.

Installation

React

To install package, use the following command:

npm install @ukpc-lib/react

.NET

With .NET applications, you can import the script and use it as follows:

Topbar: https://unpkg.com/@ukpc-lib/react@latest/web-components-bundle/global-topbar/index.js

Global Menu: https://unpkg.com/@ukpc-lib/react@latest/web-components-bundle/global-menu/index.js

Usage

To ensure the correct display, you should use the layout as shown below:

React

After installation, you can start using components by importing it into your project. Here's an example of how to use Global Menu:

import { GlobalMenu } from '@ukpc-lib/react/components';
import { useAuth } from '@ukpc-lib/react/share';
import { Outlet } from 'react-router-dom';
import TopBar from './TopBar';
import { useTranslation } from '@ukpc-lib/react/share';

export default function PrivateLayout() {
  const { logout } = useAuth();
  const { ready } = useTranslation();
  
  return (
    ready && ( <div style={{ display: 'flex', flexDirection: 'column', height: '100vh' }}>
      <div style={{ height: '64px' }}>
        <TopBar />
      </div>
      <div
        style={{
          display: 'flex',
          flexDirection: 'row',
          flex: 1,
          overflow: 'hidden',
        }}
      >
        <GlobalMenu
          baseUrl="https://saas.dev-intelli-park.com"
          menuPath="/global-menu-config/api/v1/menu-items/user"
          logout={logout}
        />
        <div style={{ flex: 1, padding: '40px', overflow: 'auto' }}>
          <Outlet />
        </div>
      </div>
    </div> )
  );
}

.NET

<div style="display: flex; flex-direction: column; height: 100vh;">
  <div style="height: 64px;">
    <global-topbar
      base-url="@baseurl"
      user="@userJson"
      logo="logoURL"
    ></global-topbar>
  </div>
  <div style="display: flex; flex-direction: row; flex: 1; overflow: hidden;">
    <global-menu
      menu-path="/global-menu-config/api/v1/menu-items/user"
      base-url="@baseurl"
      logout="logout"
    ></global-menu>
    <div style="flex: 1; padding: 40px; overflow: auto;">
      <Outlet />
    </div>
  </div>
</div>

API

Global menu:

  • baseUrl: This is the root path where the global menu resources are located.
  • menuPath: This is appended to the baseUrl to form the full URL to the menu resource.
  • logout(): A method that logs out the current user. When called, it will clear the user's session and redirect them to the login page.

Topbar:

  • baseUrl: This is the root path where the global topbar resources are located.
  • user: A JSON string representing the current user.
  • logo: The URL of the logo image to be displayed on the topbar.

Details documentation of Components and Shared Authentication Logic Links

Contributing

We always welcome community contributions. If you want to contribute, please create a Pull Request and we will review it.