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

@thebestco/ui-kit

v0.1.7

Published

BestPrice UI Kit

Readme

BestPrice UI Kit

Getting started

Install

yarn add @thebestco/ui-kit styled-components

Storybook

yarn storybook

Testing

yarn test

Build icons from Figma

The icons are exported from Bestprice Figma Icons

yarn build:icons

Sync colors from Figma

The colors are exported from Bestprice Figma colors

Those colors are also in-sync with BestPrice.gr, bp-scripts and more repos.

Peer dependencies

UI kit uses styled-components as peer dependency. You should install styled-components in your project in order to execute the ui-kit.

Designs

All the components are designed in BestPrice Figma ui-kit page

Theme

UI-kit is fully customizable, the user can configured most of the dimensions and all of the colors. Take a look on the bestprice theme preset src/theme/bestPrice/index.ts.

  breakpoints: {
    [string]: {
      fonts: {
        small: {
          size: string,
          lineHeight: string,
          fontWeight: string,
        },
        ...
      },
      inputs: {
        textarea: {
          padding: string,
        },
      }
      buttons: {
        primary: {
          padding: string,
          fontWeight: string,
          borderRadius: string,
        },
        ...
      },
    }
  supportedBreakpoints: [string],
  heuristicBreakpoints: {
    small: [string],
    medium: [string],
    large: [string],
  },
  sizes: {
    default: [number],
  },
  palette: {
    font: {
      light: [string],
    },
    inputBg: {
      light: [string],
      dark: [string],
    },
    inputBorder: {
      light: [string],
      dark: [string],
    },
    ...
  },
  colors: {},
  darkDefaults: {},
  opacity: [number],

breakpoints

The breakpoints object contains dimensions for every breakpoint. The smaller breakpoint is the base and the rest breakpoints override it. Hence, if only the smaller breakpoint exist, all the breakpoints will have the smaller presets.

palette

Colors are always keys from the theme.color. The color object (palette.[type].{color}) schema can be

  • A simple string that is always the specific color.
  • An {light: string} object, that gives the specific color in light theme, and gives the corresponding dark default in the dark theme.
  • An {light: string, dark: string} object,that gives the specific color in light theme, and the specific color in the dark theme.

Colors

An object that maps the color name to the hex value. For instance,

colors: {
  velvet: '#dfafb4',
  porcelain: '#f5f7f8',
  codGray: '#111111'
}

darkDefaults

An object that maps the color name to the color key name in the dark theme. If a color is missing, its dark variation will be the same value. For instance,

darkDefaults: {
  velvet: 'codGray'
}

Providers

Responsive provider

Provides hooks and utilities regarding the current viewport dimensions.

const breakpoint = useBreakpoint(); // for instance 'xs' | 'sm' | 'md'
const {isXS, isSM, isMD, ...} = useResponsive();
const {isSmall, isMedium, isLarge} = useHeuristic();

Theme provider

Provides the evaluated theme that is required to the ui-kit components. The theme is propagated using the styled-components ThemeProvider

const theme = useTheme();

Components

  • Box
  • Buttons
    • Primary
    • Secondary
    • Nav
    • Naked
  • Icons
  • Inputs
    • Checkbox
    • Field
    • RadioButton
    • TextArea
  • Typography
    • Title
    • Primary
    • Secondary
    • Tertiary
    • Subheading
    • Text
    • Small
    • Paragraph