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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@moondesignsystem/ui

v3.7.2

Published

Moon UI library for generating core and components CSS files

Readme

Moon UI

Moon is a multi-layered, scalable, customizable, and adaptable Design System.

Moon UI represents the first two layers of the Moon Design System and is designed to be a standalone, cross-browser, and framework-agnostic solution.

The first layer consists of cross-referenced primitive, semantic, and component CSS variables. This layer is synchronized with Figma variables, allowing you to fetch the latest design tokens in just a few minutes.

The second layer provides a collection of component CSS classes. It fully describes all components in the Moon Design System, including all available sizes and variations.

Usage

Command Line Options

# Basic usage - generates core CSS only
npx @moondesignsystem/ui

# Generate both core and component CSS
npx @moondesignsystem/ui --add-components

# Customize project name (default: 'moon')
npx @moondesignsystem/ui --projectName your-project

# Specify output directory (default: 'dist')
npx @moondesignsystem/ui --outputFolder output-folder

# Use custom Figma file IDs
npx @moondesignsystem/ui --coreFileId CORE_FILE_ID --componentsFileId COMPONENTS_FILE_ID

# Generate vanilla CSS files instead of Tailwind CSS v4 (default: 'tailwindcss')
npx @moondesignsystem/ui --target css

# Generate vanilla CSS files with browser CSS reset. Not needed with tailwindcss target
npx @moondesignsystem/ui --target css --preflight

Configuration File

If you need to customize default Moon core and components styling, add a FIGMA_TOKEN variable to your .env file and include this file in .gitignore:

FIGMA_TOKEN=YOUR_FIGMA_PERSONAL_ACCESS_TOKEN

The Moon UI library automatically creates a moonconfig.json file with default values if one doesn't exist. You can also create or modify this file manually:

{
  "projectName": "PROJECT_NAME",
  "coreFileId": "CORE_FILE_ID",
  "componentsProjectId": "COMPONENTS_PROJECT_ID",
  "outputFolder": "OUTPUT_FOLDER",
  "target": "tailwindcss",
  "preflight": false,
  "themes": {}
}

Multi-theme Support

For additional themes, add theme names and their corresponding Figma file IDs to the themes object:

{
  "themes": {
    "theme1": "THEME_1_CORE_FILE_ID",
    "theme2": "THEME_2_CORE_FILE_ID"
  }
}

CSS Output Targets

Moon UI supports two output formats:

TailwindCSS v4 (Default)

Generates CSS compatible with TailwindCSS v4 using @theme inline directives:

Vanilla CSS

Generates standard CSS using :root selectors for maximum compatibility:

npx @moondesignsystem/ui --target css

Note: With vanilla CSS output, you'll retain typography and shadow utility classes, but some Tailwind-specific utility classes will not be generated.

Generated Files

The following files are created in your specified output directory:

  • {projectName}-core.css - Core CSS variables and utilities
  • {projectName}-components.css - Component classes (when --add-components is used)
  • {projectName}-preflight.css - CSS reset (when --preflight is used)
  • {themeName}-core.css - Theme-specific CSS files (one per theme in config)

License

MIT

Versioning

Moon UI follows Semantic Versioning. View available versions in the repository tags.

  • MAJOR: Incompatible API changes
  • MINOR: New backward-compatible functionality
  • PATCH: Backward-compatible bug fixes