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

@gitlab-ui-react/tokens

v0.3.0

Published

Design tokens for GitLab UI React

Readme

@gitlab-ui-react/tokens

Design tokens for GitLab UI for React, generated from the Pajamas Design System. The package provides the same token set in CSS, JavaScript, JSON, Sass, Tailwind, and Figma-friendly formats.

[!note] The token source files are synchronized directly from GitLab's upstream design repository and are distributed without changes to their definitions or values. This project only builds and packages the upstream tokens into formats that applications and design tools can consume.

Installation

pnpm add @gitlab-ui-react/tokens

If you use the React component library, install @gitlab-ui-react/styles instead. Its compiled stylesheet already includes the light and dark CSS tokens, and it installs this package as a dependency.

CSS

Import both stylesheets once in your application entry stylesheet:

@import "@gitlab-ui-react/tokens/dist/css/tokens.css";
@import "@gitlab-ui-react/tokens/dist/css/tokens.dark.css";

Tokens are then available as custom properties:

.product-card {
  color: var(--gl-text-color-default);
  background-color: var(--gl-background-color-default);
  border: 1px solid var(--gl-border-color-default);
  border-radius: var(--gl-border-radius-md);
  padding: var(--gl-spacing-scale-4);
}

Prefer semantic tokens such as --gl-text-color-default and contextual component tokens over raw palette values. Semantic tokens preserve the intended meaning when themes change.

Color modes

The light theme applies to :root by default. Import tokens.dark.css and use one of the following classes to change the inherited token values:

  • Add gl-dark to the document root to enable dark mode for the entire page.
  • Add gl-dark-scope to an element to enable dark mode for one subtree.
  • Add gl-light-scope to a subtree to switch it back to light mode.
<html class="gl-dark">
  <body>
    <main>Dark theme</main>
    <aside class="gl-light-scope">Light theme inside a dark page</aside>
  </body>
</html>

JavaScript

The ESM builds expose resolved token values as named constants. Use the dark build when you need a fixed dark-mode value rather than a theme-aware CSS custom property.

import {
  GL_BACKGROUND_COLOR_DEFAULT,
  GL_SPACING_SCALE_4,
} from "@gitlab-ui-react/tokens/dist/js/tokens.js";

import { GL_BACKGROUND_COLOR_DEFAULT as GL_DARK_BACKGROUND } from "@gitlab-ui-react/tokens/dist/js/tokens.dark.js";

Package contents

| Format | Files | Intended use | | ------------- | ------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | CSS | dist/css/tokens.css, tokens.dark.css | Theme-aware CSS custom properties | | JavaScript | dist/js/tokens.js, tokens.dark.js | Resolved ESM constants for application code and tooling | | JSON | dist/json/tokens.json, tokens.dark.json | Structured token data for custom tooling | | Sass | dist/scss/_tokens.scss, _tokens.dark.scss, _tokens_custom_properties.scss | Resolved Sass variables or Sass aliases to CSS custom properties | | Tailwind | dist/tailwind/tokens.cjs, components.cjs | Theme values and typography components for Tailwind integrations | | Figma | dist/figma/*.json | Constants and light/dark mode variables for design tooling | | Documentation | dist/docs/*.json | Generated token metadata used by documentation tooling |

All files in dist are generated and published with the package.

Repository development

Token source files live in src and are mirrored from the current upstream GitLab design repository without local modifications. Token changes must come from upstream; this repository only maintains the build and distribution tooling. Do not edit generated files in dist directly. The repository's upstream sync workflow owns routine token synchronization and regeneration; follow the root contributor instructions when changing build tooling.

Related resources

License

MIT