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

@the-memoize-project/token

v0.1.0

Published

Design token system for The Memoize Project. Centralized CSS custom properties for colors, spacing, typography, and visual effects.

Readme

@the-memoize-project/token

Centralized design token system for The Memoize Project.

A comprehensive set of CSS custom properties (CSS variables) providing consistent colors, spacing, typography, and visual effects across the entire application ecosystem.

Features

  • 108 Design Tokens across 10 categories
  • Zero Dependencies - Pure CSS with no runtime requirements
  • Light/Dark Mode - Built-in support using CSS light-dark() function
  • Framework Agnostic - Works with any web framework or vanilla HTML/CSS
  • Type-Safe - Includes TypeScript declarations for CSS imports
  • Modular - Import individual token categories or all tokens at once
  • Well-Documented - Comprehensive comments explaining usage for each token

Installation

npm install @the-memoize-project/token

Quick Start

Import All Tokens

/* Simplest way - import everything */
@import "@the-memoize-project/token";

.my-component {
  color: var(--color-primary);
  padding: var(--spacing-md);
  font-size: var(--font-size-lg);
  border-radius: var(--border-radius-sm);
}

Import Individual Categories

/* More granular - only what you need */
@import "@the-memoize-project/token/color";
@import "@the-memoize-project/token/spacing";

.button {
  background-color: var(--color-primary);
  padding: var(--spacing_inset-sm);
  color: var(--color-pure-white);
}

Token Categories

Colors (42 tokens)

Comprehensive color palette with light/dark mode support:

  • Master: Neutral colors for text and backgrounds
  • Primary: Brand colors for interactive elements
  • Semantic: Success, warning, danger, complete, info colors
  • Menu: Specific colors for navigation
  • Pure: Absolute black and white

Example:

.alert-success {
  background-color: var(--color-success-lighter);
  color: var(--color-success-darker);
  border: var(--border-width-thin) solid var(--color-success);
}

Spacing (21 tokens)

Consistent spacing scale for margins, gaps, and padding:

  • Margin/Gap Scale: quarck (4px) → giant (200px)
  • Inset Padding: quarck (4px) → giant (56px)

Example:

.card {
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing_inset-md);
  gap: var(--spacing-xs);
}

Typography (23 tokens)

Complete typography system:

  • Font Family (2): base, highlight
  • Font Size (11): xxxs (12px) → giant (96px)
  • Font Weight (3): regular (400), medium (500), bold (700)
  • Line Height (7): default (100%) → xxl (200%)

Example:

.heading {
  font-family: var(--font-family-highlight);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-sm);
}

Borders (12 tokens)

  • Border Radius (7): nonecircular (50%)
  • Border Width (5): noneheavy (8px)

Example:

.button {
  border-radius: var(--border-radius-pill);
  border: var(--border-width-thin) solid var(--color-primary);
}

Visual Effects (9 tokens)

  • Shadow (4): Elevation levels from subtle to deep
  • Opacity (5): Transparency levels for overlays and effects

Example:

.modal {
  box-shadow: var(--shadow-level-4) var(--color-master-darkest);
  background-color: var(--color-master-lightest);
}

.overlay {
  opacity: var(--opacity-level-semiopaque);
}

Light/Dark Mode

All color tokens use CSS's light-dark() function, automatically adapting to the user's color scheme preference:

:root {
  color-scheme: light dark; /* Enable automatic switching */
}

.text {
  /* Automatically uses #2c2c2c in light mode, #c9c9c9 in dark mode */
  color: var(--color-master-dark);
}

Usage with Web Components

import { css } from "@the-memoize-project/std/dom";
import "@the-memoize-project/token";

const styles = css`
  :host {
    display: block;
    padding: var(--spacing_inset-md);
    background: var(--color-master-lightest);
    border-radius: var(--border-radius-md);
  }

  .title {
    font-family: var(--font-family-highlight);
    font-size: var(--font-size-lg);
    color: var(--color-primary);
  }
`;

Package Exports

{
  "@the-memoize-project/token": "./packages/index.css",
  "@the-memoize-project/token/color": "./packages/color/index.css",
  "@the-memoize-project/token/spacing": "./packages/spacing/index.css",
  "@the-memoize-project/token/fontFamily": "./packages/fontFamily/index.css",
  "@the-memoize-project/token/fontSize": "./packages/fontSize/index.css",
  "@the-memoize-project/token/fontWeight": "./packages/fontWeight/index.css",
  "@the-memoize-project/token/lineHeight": "./packages/lineHeight/index.css",
  "@the-memoize-project/token/borderRadius": "./packages/borderRadius/index.css",
  "@the-memoize-project/token/borderWidth": "./packages/borderWidth/index.css",
  "@the-memoize-project/token/shadow": "./packages/shadow/index.css",
  "@the-memoize-project/token/opacity": "./packages/opacity/index.css"
}

Documentation

Browser Support

Works in all modern browsers supporting:

  • CSS Custom Properties (CSS Variables)
  • CSS light-dark() function (Safari 17.5+, Chrome 123+, Firefox 120+)

For older browsers, colors will use the light mode values by default.

Related Projects

License

MIT License - see LICENSE file for details.

Contributing

We welcome contributions! Please read our Contributing Guide and Code of Conduct.

Support