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

@hdruk/ui

v1.1.1

Published

HDR UK MUI-based component library for Next.js

Readme

@hdruk/ui

Common, theme-driven UI for the HDRUK Tech Team.
Built on MUI v7, with a shared HDRUK brand theme and a set of reusable components.

Install

npm i @hdruk/ui
# peer deps
npm i @mui/material @emotion/react @emotion/styled

Setup

Wrap your app with HdrukUiProvider. In Next.js, this goes in your theme registry component:

"use client";

import { ReactNode } from "react";
import { AppRouterCacheProvider } from "@mui/material-nextjs/v15-appRouter";
import { HdrukUiProvider } from "@hdruk/ui";

export default function ThemeRegistry({ children }: { children: ReactNode }) {
  return (
    <AppRouterCacheProvider>
      <HdrukUiProvider>
        {children}
      </HdrukUiProvider>
    </AppRouterCacheProvider>
  );
}

Pass themeOptions to extend or override the brand theme:

<HdrukUiProvider themeOptions={{ shape: { borderRadius: 10 } }}>
  {children}
</HdrukUiProvider>

Components

Button

Extends MUI Button with a loading state. Defaults to variant="contained".

import { Button } from "@hdruk/ui";

<Button loading={isSubmitting} onClick={handleSubmit}>
  Submit
</Button>

| Prop | Type | Default | Description | |------|------|---------|-------------| | loading | boolean | false | Shows a spinner and disables the button | | variant | MUI variant | "contained" | Button variant |

All other MUI Button props are supported.


SearchBar

Controlled or uncontrolled search input with debounce, clear button, and an optional ⌘K / Ctrl+K focus shortcut.

import { SearchBar } from "@hdruk/ui";

<SearchBar
  value={query}
  onChange={setQuery}
  onSearch={handleSearch}
  placeholder="Search datasets…"
  shortcut
/>

| Prop | Type | Default | Description | |------|------|---------|-------------| | value | string | — | Controlled value | | defaultValue | string | — | Uncontrolled initial value | | onChange | (value: string) => void | — | Called on every keystroke (after debounce) | | onSearch | (value: string) => void | — | Called on Enter or debounce completion | | debounceMs | number | 300 | Debounce delay in ms | | loading | boolean | false | Shows a spinner in the input | | disableClear | boolean | false | Hides the clear button | | shortcut | boolean | false | Enables ⌘K / Ctrl+K focus shortcut | | actions | ReactNode | — | Slot rendered to the right of the input | | filters | ReactNode | — | Slot rendered below the input | | size | "small" \| "medium" | MUI default | Input size |


Header

Full-width AppBar with primary and secondary logos, desktop/mobile navigation, and an account menu.

import { Header } from "@hdruk/ui";
import Link from "next/link";

<Header
  linkComponent={Link}
  accountLoading={sessionLoading}
  isLoggedIn={!!user}
  accountName={{ first: "Jane", last: "Smith" }}
  navItems={[
    { label: "Explore", href: "/explore" },
    { label: "About", subItems: [{ label: "Team", href: "/about/team" }] },
  ]}
  accountNavigation={{
    profile: { label: "My profile", href: "/profile" },
    logout: { label: "Sign out", action: handleLogout },
    signIn: { label: "Sign in", href: "/login" },
  }}
/>

| Prop | Type | Default | Description | |------|------|---------|-------------| | accountLoading | boolean | — | Required. Shows a skeleton while session loads | | isLoggedIn | boolean | — | Switches between account menu and sign-in link | | accountName | { first: string; last: string } | — | Used for the initials badge and display label | | navItems | HeaderMenuLinkItem[] | [] | Primary nav links; support subItems for dropdowns | | accountNavigation | AccountNavigation | — | Profile, extra items, logout, and sign-in config | | linkComponent | React.ElementType | <a> | Pass next/link for client-side routing | | logoImage | ReactNode | HDRUK logo | Override the primary logo | | logoHref | string | "/" | URL for the primary logo link | | brandingLogoImage | ReactNode | — | Secondary/partner logo | | brandingLogoHref | string | — | URL for the secondary logo | | appBarColour | MUI AppBarProps["color"] | "primary" | AppBar colour palette key | | focusRingColour | string | — | Keyboard focus ring colour override | | accountInitialsColour | string | — | Background colour for the initials badge |


Footer

Branded footer with link groups, social links, and a logo.

import { Footer } from "@hdruk/ui";
import Link from "next/link";

<Footer
  linkComponent={Link}
  linkGroups={[
    {
      title: "Resources",
      items: [
        { label: "Documentation", href: "/docs" },
        { label: "API", href: "/api" },
      ],
    },
  ]}
/>

| Prop | Type | Default | Description | |------|------|---------|-------------| | linkGroups | FooterLinkGroup[] | — | Columns of links rendered in the footer body | | socialLinks | SocialLinkItem[] | X + LinkedIn | Social/external icon links | | copyrightText | string | © HDR UK <year> | Copyright line at the bottom | | footerBackgroundColor | string | Theme gradient | CSS colour or gradient for the footer background | | logoImage | ReactNode | HDRUK logo | Override the footer logo | | linkComponent | React.ElementType | <a> | Pass next/link for client-side routing | | sx | MUI SxProps | — | Style overrides for the footer root element |