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

@grafana/components

v0.0.52

Published

Product Design Engineering Components for Grafana

Downloads

19,591

Readme

Grafana Product Design Engineering Components

Installation

Add @grafana/components to your project’s dependencies:

$ npm install @grafana/components

or

$ yarn add @grafana/components

To ensure that the necessary providers are present, you should add the following to your App.tsx (or equivalent):

import { getAppEvents } from '@grafana/runtime';
import { useTheme2 } from '@grafana/ui';
import { PortalProvider, ColorMode } from '@grafana/components';

const App = () => {
  return (
    <PortalProvider defaultRoot="grafana-portal-container">
      <ColorMode getAppEvents={getAppEvents} useTheme2={useTheme2}>
        <YourApp />
      </ColorMode>
    </PortalProvider>
  );
};

The dependency on useTheme2 is necessary (for now) to detect the active color mode (light or dark); this dependency will go away in the longer term.

Additionally, to ensure that the stylesheet imported by ColorMode is correctly included in the App bundle, you will need to update your project’s webpack.config.ts configuration for the style-loader loader module:

  {
    test: /\.css$/,
    use: ['style-loader', 'css-loader'],
+   sideEffects: true,
  },

This is to ensure that including stylesheets with @import 'path/to/stylesheet.css'; works correctly and the stylesheets aren’t unintentionally ‘tree-shaken’ out.

Custom Icons

The icons included with @grafana/components are based on Lucide, which provides over 1,800 consistent icons. In addition, there are a smaller number of custom icons available. All custom icons are sourced from src/icons/svg, whereas the Lucide icons are sourced from the lucide-static package.

Since Lucide’s icon design principles state you should design your icon to use stroked paths, should you need to use solid filled shapes in your icon, you will need to make sure it follows the right approach:

  • The <path> elements should be devoid of any style attributes or other properties (i.e. only the d property should exist)
  • The root level <svg> element should have the fill="solid" attribute property

The latter property is important when running yarn import:icons to ensure the component will render with a solid fill and no stroke. You should also try to follow the icon design principles where possible to keep it consistent with other icons.

...

Publishing

Currently this repo is not configured to automatically publish through CI (the GH action will report as failing). In order to publish a new version, you will need to do so locally using 2FA. First log into npmjs.com using this script:

yarn npm:login

Once this confirms you are logged in, run this script to build and publish the package (you will be prompted to enter a 2FA code again):

yarn build:publish