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

frontcraft

v1.0.0

Published

The Frontend Craft Specification. 324 rules across 20 categories with measurable thresholds. Utilities for color contrast, timing validation, spring physics, typography scales, spacing systems, and touch target compliance.

Readme

frontcraft

The Frontend Craft Specification. 324 rules across 20 categories. Every rule has a name, a priority, and a measurable threshold.

No opinions without numbers. No principles without proof.

Install the Agent Skill

npx skills add Dragoon0x/frontcraft

Works with Claude Code, Cursor, Codex, Windsurf, and 15+ other AI coding agents.

Install the npm Package

npm install frontcraft

TypeScript utilities that implement the rules programmatically: color contrast checking, timing validation, spring physics analysis, typography scale generation, spacing system helpers, and touch target compliance.

What's Inside

20 categories. 324 rules. 65 Critical. 152 High. 98 Medium. 9 Low.

| Category | Rules | Category | Rules | |---|---|---|---| | Motion & Timing | 26 | Loading States | 13 | | Typography | 25 | Error States | 14 | | Accessibility | 35 | Dark Mode | 12 | | Color & Contrast | 20 | Keyboard Navigation | 10 | | Touch & Interaction | 20 | Sound Design | 8 | | Layout & Spacing | 19 | Micro-interactions | 15 | | Responsive Design | 16 | Forms & Input | 15 | | Performance | 24 | Navigation | 12 | | Icons & Imagery | 11 | Scroll Behavior | 9 | | Content & Copy | 10 | Performance Perception | 10 |

Rule Format

Every rule follows this structure:

### rule-name
**Priority**: CRITICAL | HIGH | MEDIUM | LOW
**Threshold**: A measurable number, not a vague recommendation
\`\`\`code
// Production-ready implementation
\`\`\`

When the agent finds violations, it reports:

motion-duration-cap | CRITICAL | src/Button.tsx:42 | Transition 800ms exceeds 500ms cap | Use 200ms ease-out

npm Package Usage

import {
  checkContrast,
  validateTiming,
  analyzeSpring,
  generateTypeScale,
  validateTouchTarget,
  responsiveClamp,
} from 'frontcraft';

// Check WCAG contrast compliance
const result = checkContrast('#333', '#fff');
// { ratio: 12.63, aa: true, aaa: true, aaLarge: true, aaaLarge: true }

// Validate animation timing
const timing = validateTiming('fadeIn', 150);
// { valid: true, value: 150, rule: 'timing-fadeIn', min: 120, max: 180 }

// Analyze spring configuration
const spring = analyzeSpring(200, 20);
// { stiffness: 200, damping: 20, mass: 1, dampingRatio: 0.707, settleTime: 326 }

// Generate responsive typography
const clamp = responsiveClamp(16, 24);
// 'clamp(1.000rem, 0.571rem + 0.714vw, 1.500rem)'

// Validate touch targets
const touch = validateTouchTarget(36, 36, 'mobile');
// { valid: false, minimumSize: 48, message: '...' }

Utilities

Color & Contrast: checkContrast, contrastRatio, checkUIComponentContrast, checkFocusContrast, suggestTextColor, minimumOpacityForAA

Timing: validateTiming, validateExitFasterThanEnter, calculateStagger, getTimingThresholds

Spring Physics: analyzeSpring, validateSpring, suggestSpring, dampingRatio, estimateSettleTime, SPRING_PRESETS

Easing: getEasing, validateBezier, generateEasingTokens, EASING_PRESETS

Typography: generateTypeScale, responsiveClamp, validateMeasure, validateBaseFontSize, validateLineHeight, systemFontStack, generateTypeTokens

Touch: validateTouchTarget, calculateTouchPadding, validateTargetSpacing

Spacing: isOnScale, nearestScaleValue, validateInternalExternal, generateSpacingTokens, validateSectionSpacing, SPACING_TOKENS

Contributing

Open an issue or PR. New rules must follow the format:

  1. Unique kebab-case name
  2. CRITICAL, HIGH, MEDIUM, or LOW priority
  3. A measurable threshold (a number, a ratio, a pixel value)
  4. Production code showing pass/fail

DISCLAIMER

This project is experimental and provided as-is. Do your own research (DYOR). Rules are based on widely accepted standards (WCAG, Material Design, Nielsen Norman Group research, Apple HIG) but specific thresholds may need adjustment for your context.

License

MIT — Dragoon0x