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

@kooshapari/phenotype-design-utils

v0.1.0

Published

Shared design utilities for Phenotype projects: color, typography, spacing, motion, and layout

Readme

@kooshapari/phenotype-design-utils

Design utility functions for the Phenotype ecosystem. Color (OKLCH), responsive type scales, spacing, motion, and layout helpers.

Installation

npm install @kooshapari/phenotype-design-utils

Modules

Color (OKLCH)

import { hexToOKLCH, contrastRatio, meetsWCAG, mixOKLCH, generatePalette } from '@kooshapari/phenotype-design-utils/color';

// Parse hex to OKLCH
const teal = hexToOKLCH('#7EBAB5');

// Check WCAG compliance
const fg = { r: 23, g: 26, b: 24 }; // obsidian
const bg = { r: 243, g: 240, b: 232 }; // paper-100
meetsWCAG(fg, bg, 'AA'); // true
contrastRatio(fg, bg); // ~16.5

// Mix two colors
const mixed = mixOKLCH(teal, hexToOKLCH('#F6F5F5'), 0.5);

// Generate palette from seed
const palette = generatePalette(teal); // 5-stop lightness ramp

Type Scale

import { phenoTypeScale, clampFluid, generateTypeScale } from '@kooshapari/phenotype-design-utils/type-scale';

// Use the canonical Phenotype scale
phenoTypeScale['0'].clamp; // "clamp(0.96rem, 0.9rem + 0.25vw, 1.08rem)"

// Generate a custom fluid scale
const custom = generateTypeScale({
  sm: { minRem: 0.875, maxRem: 1 },
  lg: { minRem: 1.25, maxRem: 2 },
});

Spacing

import { spacing, spacingPx, closestStep, fluidGutter } from '@kooshapari/phenotype-design-utils/spacing';

spacing(3);  // "1rem" (16px)
spacingPx(5); // 36
closestStep(20); // 3 (closest to 16px)
fluidGutter();   // "clamp(1rem, 3vw, 3.75rem)"

Motion

import { fadeTransition, springGentle, staggerDelays } from '@kooshapari/phenotype-design-utils/motion';

// Predefined transitions
fadeTransition.css;     // "160ms cubic-bezier(0.16, 1, 0.3, 1)"
springGentle.css;       // "cubic-bezier(0.34, 1.56, 0.64, 1)"

// Stagger delays for list animations
const delays = staggerDelays(5); // ["0ms", "40ms", "80ms", "120ms", "160ms"]
const delays = staggerDelays(5, { baseDelayMs: 100, incrementMs: 60 });

Layout

import { minWidth, breakpoints, fluidGrid, measure } from '@kooshapari/phenotype-design-utils/layout';

minWidth('lg');  // "@media (min-width: 1024px)"
minWidth(768);   // "@media (min-width: 768px)"
fluidGrid('250px', '1.5rem'); // "repeat(auto-fill, minmax(250px, 1fr))"
measure();       // "68ch"

Design Principles

  • Precision, not plush — Sharp geometry, 1px hover lifts, short motion
  • Seed-first — Compose from four canonical Material Lab seeds
  • Measured width — 68ch measure for readable text
  • Short motion — 120ms-380ms range, no ambient loops
  • Mobile-first — min-width breakpoints, fluid clamp() for typography