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

@bitcredit/ui-library

v0.1.5-terms-bugfix

Published

Bitcredit design system and reusable React UI library.

Downloads

2,429

Readme

@bitcredit/ui-library

Bitcredit design system and reusable React UI library.

Installation

Install the package together with its peer dependencies:

npm install @bitcredit/ui-library react react-dom

If you consume the GitHub Packages build instead, use the published package name for that registry:

npm install @bitcreditprotocol/ui-library react react-dom

Quick Start

Import the library stylesheet once near your app entrypoint, then import the components you need:

import "@bitcredit/ui-library/style.css";
import { Button } from "@bitcredit/ui-library";

export function Example() {
  return <Button>Continue</Button>;
}

For predictable consumer behavior, treat the explicit style.css import as required public API. The JS package entry currently carries the stylesheet through the library build, but consumers should not rely on implicit style loading.

The package ships:

  • dist/index.mjs for ESM consumers
  • dist/index.cjs for CommonJS consumers
  • dist/index.d.ts for TypeScript types
  • dist/style.css for the shared library styles

CSS

This library currently expects consumers to load the exported stylesheet:

import "@bitcredit/ui-library/style.css";

Without that import, many components will render without the expected design system styling.

Recommended pattern:

import "@bitcredit/ui-library/style.css";
import { Button, Card } from "@bitcredit/ui-library";

Provider Setup

Some components and hooks depend on providers from the library. A common app-level setup looks like this:

import "@bitcredit/ui-library/style.css";
import {
  LanguageProvider,
  PreferencesProvider,
  Toaster,
} from "@bitcredit/ui-library";

export function AppProviders({ children }: { children: React.ReactNode }) {
  return (
    <LanguageProvider>
      <PreferencesProvider>
        {children}
        <Toaster />
      </PreferencesProvider>
    </LanguageProvider>
  );
}

Use the providers you actually need:

  • PreferencesProvider for theme, currency, and decimal preferences
  • LanguageProvider for react-intl-based localization helpers
  • UiI18nProvider for framework-agnostic shared UI message injection
  • Toaster when using toast UI from useToast

Translation Strategy

For shared UI text, prefer app-owned translations with library-owned keys and fallbacks.

The library now exports:

  • UiTranslationKey
  • defaultUiMessages
  • UiI18nProvider
  • getUiText

Minimal example:

import "@bitcredit/ui-library/style.css";
import {
  Button,
  UiI18nProvider,
  defaultUiMessages,
  type UiTranslationKey,
} from "@bitcredit/ui-library";

const appMessages: Partial<Record<UiTranslationKey, string>> = {
  "ui.upload.label": "Datei hochladen",
};

export function AppProviders({ children }: { children: React.ReactNode }) {
  return <UiI18nProvider messages={appMessages}>{children}</UiI18nProvider>;
}

You can also provide a translation function instead of a message map:

import { UiI18nProvider, type UiT } from "@bitcredit/ui-library";

const t: UiT = (key, params) => myI18n.translate(key, params);

export function AppProviders({ children }: { children: React.ReactNode }) {
  return <UiI18nProvider t={t}>{children}</UiI18nProvider>;
}

Current migration note:

  • generic UI components can consume UiI18nProvider
  • existing react-intl consumers continue to work
  • domain and app copy should stay in consuming apps

Example Imports

import {
  Button,
  Card,
  DatePicker,
  Input,
  Search,
  useToast,
} from "@bitcredit/ui-library";

Package Notes

  • The package is built in Vite library mode.
  • Only library artifacts are published; app bundle files like index.html are not part of the package.
  • react and react-dom are peer dependencies and must be provided by the consuming app.
  • Tailwind and Vite integration packages are build-time dependencies of this repository, not runtime requirements for consumers.
  • TypeScript declarations are generated and published with the package.

Development

Useful local commands:

npm run dev
npm run storybook
npm run build
npm run test
npm run lint
npm run style:check

Repository

  • Repository: https://github.com/BitcreditProtocol/ui.git
  • Storybook and local component development remain part of this repository, but the published package is a consumable UI library.