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

@typeb-digital/nucleus-ui-react

v0.0.2

Published

Type B design-language UI kit — Mantine v9 theme, design tokens, and Tailwind preset for consistent UIs across Next.js, Vite, and any React app

Readme

@typeb-digital/nucleus-ui-react

The Type B design-language UI kit. Ship it into any React app — Next.js, Vite, or plain React — so every Type B product shares one look: the same palette, typography (DM Sans / DM Mono), spacing, radii, shadows, and light/dark behaviour, no matter who (or what) builds it.

It's a thin layer over Mantine v9: a themed NucleusProvider, the Nucleus theme + design tokens, a useNucleusColorScheme hook, a re-export of the full Mantine API, and an optional Tailwind preset.

Two ways to stay consistent

  1. Mantine tier (full consistency). Wrap your app in NucleusProvider and use Mantine components — you get pixel-identical, on-brand UI for free.
  2. Token tier (design language without Mantine). Import the stylesheet and/or the Tailwind preset and build your own components against the same --color-* variables / Tailwind tokens.

Install

Mantine and React are peer dependencies — install them alongside the kit:

npm install @typeb-digital/nucleus-ui-react \
  @mantine/core @mantine/hooks @mantine/notifications @mantine/form @mantine/dates \
  react react-dom

Add the DM Sans / DM Mono fonts once (any method works — a <link>, @fontsource, or next/font):

<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
  href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=DM+Mono:wght@400;500&display=swap"
  rel="stylesheet"
/>

The same URL is exported as GOOGLE_FONTS_URL if you prefer to reference it in code.


Next.js (App Router)

ColorSchemeScript must render in <head> to prevent a flash of the wrong theme. Because Mantine components are client components, wrap children in a small 'use client' provider.

// app/providers.tsx
'use client';
import { NucleusProvider } from '@typeb-digital/nucleus-ui-react';

export function Providers({ children }: { children: React.ReactNode }) {
  return <NucleusProvider defaultColorScheme="auto">{children}</NucleusProvider>;
}
// app/layout.tsx
import '@typeb-digital/nucleus-ui-react/styles.css';
import { ColorSchemeScript, GOOGLE_FONTS_URL } from '@typeb-digital/nucleus-ui-react';
import { Providers } from './providers';

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en" suppressHydrationWarning>
      <head>
        <ColorSchemeScript defaultColorScheme="auto" />
        <link rel="stylesheet" href={GOOGLE_FONTS_URL} />
      </head>
      <body>
        <Providers>{children}</Providers>
      </body>
    </html>
  );
}

Vite / Create React App / plain React

// main.tsx
import '@typeb-digital/nucleus-ui-react/styles.css';
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import { NucleusProvider } from '@typeb-digital/nucleus-ui-react';
import App from './App';

createRoot(document.getElementById('root')!).render(
  <StrictMode>
    <NucleusProvider defaultColorScheme="auto">
      <App />
    </NucleusProvider>
  </StrictMode>,
);

Add the font <link> (above) to your index.html.


Non-Mantine React (token tier)

You don't have to use Mantine to look like Type B. Two options:

Tailwind preset — pick up bg-primary, text-secondary, border, font-sans, etc.:

// tailwind.config.ts
import { nucleusPreset } from '@typeb-digital/nucleus-ui-react/tailwind';

export default {
  presets: [nucleusPreset],
  content: ['./src/**/*.{ts,tsx}'],
};

Still import @typeb-digital/nucleus-ui-react/styles.css so the CSS variables (and dark-mode values) are defined, and toggle themes by setting data-mantine-color-scheme="dark" on <html>.

Raw CSS variables — reference them directly, no Tailwind required:

.card {
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

API

| Export | Description | | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | NucleusProvider | MantineProvider preconfigured with the Nucleus theme + notifications. Props: defaultColorScheme?: 'light' \| 'dark' \| 'auto'. | | ColorSchemeScript | Re-exported from Mantine; render in <head> to avoid theme flash. | | theme | The Mantine createTheme object, if you need to extend or inspect it. | | useNucleusColorScheme() | { colorScheme, isDark, isLight, toggle, setLight, setDark, setAuto }. | | GOOGLE_FONTS_URL | DM Sans + DM Mono Google Fonts URL. | | everything from Mantine | @mantine/core, /hooks, /notifications, /form, /dates are re-exported. | | @typeb-digital/nucleus-ui-react/styles.css | Mantine CSS + Nucleus design tokens (light/dark). | | @typeb-digital/nucleus-ui-react/tailwind | nucleusPreset Tailwind v4 preset. | | @typeb-digital/nucleus-ui-react/rich-text | Rich-text editing (opt-in — see below). |

Rich text (opt-in)

Rich text pulls in the whole ProseMirror stack, so it lives on its own entry point with optional peers: apps that don't author formatted content install nothing extra and are unaffected.

yarn add @mantine/tiptap @tiptap/react @tiptap/core @tiptap/pm @tiptap/starter-kit @tiptap/extension-link
import '@typeb-digital/nucleus-ui-react/rich-text.css'; // alongside styles.css
import { RichTextEditor, useRichTextEditor } from '@typeb-digital/nucleus-ui-react/rich-text';

function Body({ value, onChange }: { value: string | null; onChange: (html: string) => void }) {
  const editor = useRichTextEditor({ content: value, onChange });
  return (
    <RichTextEditor editor={editor}>
      <RichTextEditor.Toolbar sticky>
        <RichTextEditor.ControlsGroup>
          <RichTextEditor.Bold />
          <RichTextEditor.Italic />
          <RichTextEditor.BulletList />
          <RichTextEditor.Link />
        </RichTextEditor.ControlsGroup>
      </RichTextEditor.Toolbar>
      <RichTextEditor.Content />
    </RichTextEditor>
  );
}

useRichTextEditor is the house editor — StarterKit + links, wired to an onChange(html) callback so you treat it like a controlled input. Prefer it over hand-assembling extensions so formatting stays consistent across apps. Everything from @mantine/tiptap is re-exported if you need lower-level control.

Rendering stored HTML read-only? Use useRichTextEditor({ content, editable: false }) — never dangerouslySetInnerHTML on user-authored content.

Design tokens

Defined for both [data-mantine-color-scheme='light'] and 'dark':

--color-bg-primary · --color-bg-secondary · --color-bg-sidebar · --color-text-primary · --color-text-secondary · --color-text-muted · --color-border · --color-border-strong · --color-primary · --color-primary-hover · --color-primary-subtle · --color-primary-text · --color-success(-subtle) · --color-warning(-subtle) · --color-error(-subtle)

The brand primary is Nucleus teal (#418a90).