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

@dynamic-mockups/design-system

v0.2.5

Published

A professional, scalable design system built with React 18, TypeScript, Radix UI, and Storybook

Downloads

420

Readme

🎨 Dynamic Mockups Design System

A production-ready, scalable design system built with modern best practices.

📦 Tech Stack

  • React 18.3.1 - Latest React with hooks
  • TypeScript 5.9.3 - Full type safety
  • Radix UI Themes 3.2.1 - Accessible primitives
  • SCSS - Enhanced styling with nesting and variables
  • Vite 6.0.7 - Lightning-fast build tool
  • Storybook 10.1.4 - Component documentation
  • Vitest - Testing framework

📁 Final Project Structure

design-system/
├── src/
│   ├── tokens/                    # Design tokens (Type-safe)
│   │   ├── colors.ts             # Brand & semantic colors (50-950 scales)
│   │   ├── spacing.ts            # 8px grid system (0-96)
│   │   ├── typography.ts         # Font families, sizes, weights
│   │   ├── radii.ts              # Border radius values
│   │   ├── shadows.ts            # Elevation shadows
│   │   └── index.ts              # Token exports
│   │
│   ├── theme/                     # Theme system
│   │   ├── theme.ts              # Theme configuration
│   │   ├── ThemeProvider.tsx     # React context provider
│   │   └── index.ts
│   │
│   ├── components/                # Component library
│   │   ├── Button/
│   │   │   ├── Button.tsx        # Component logic
│   │   │   ├── Button.scss       # SCSS styles
│   │   │   ├── Button.stories.tsx # Storybook stories
│   │   │   └── index.ts
│   │   │
│   │   ├── Input/                # Text input with labels, icons, errors
│   │   ├── Switch/               # Toggle switch
│   │   ├── Checkbox/             # Checkbox with labels
│   │   ├── Select/               # Dropdown select
│   │   └── index.ts              # Component exports
│   │
│   └── index.ts                   # Main entry point
│
├── dist/                          # Build output
│   ├── index.js                  # CommonJS bundle
│   ├── index.mjs                 # ESM bundle
│   ├── index.d.ts                # TypeScript declarations
│   ├── design-system.css         # Compiled CSS from SCSS
│   └── [component folders]/      # Individual declarations
│
├── stories/                       # Storybook files
├── .storybook/                   # Storybook config
├── tsconfig.json                 # TypeScript config
├── vite.config.ts                # Vite build config
├── package.json                  # Package manifest
└── README.md                     # Usage documentation

🎨 Components Built

1. Button - Full-featured button component

  • Variants: solid, soft, outline, ghost, surface
  • Colors: primary, secondary, accent, success, error, warning, info + Radix colors
  • Sizes: 1-4
  • Features: Loading states, left/right icons, full width, disabled states
  • SCSS File: Button.scss with CSS variables for customization

2. Input - Professional text input

  • Variants: surface, classic, soft
  • Sizes: 1-3
  • Colors: Custom focus colors (primary, secondary, accent, etc.)
  • Features: Labels, helper text, error states, left/right icons, full width
  • SCSS File: Input.scss with focus states and variants

3. Switch - Toggle switch

  • Sizes: 1-3
  • Colors: Custom colors beyond Radix defaults
  • Features: Labels, helper text, left/right label positions
  • SCSS File: Switch.scss

4. Checkbox - Checkbox input

  • Sizes: 1-3
  • Colors: Custom colors
  • Features: Labels, helper text, error states, indeterminate state
  • SCSS File: Checkbox.scss

5. Select - Dropdown select

  • Variants: surface, classic, soft, ghost
  • Sizes: 1-3
  • Colors: Custom focus colors
  • Features: Labels, helper text, error states, disabled options, full width
  • SCSS File: Select.scss

🎯 Design Tokens System

Colors

import { colors } from 'design-system';

// Brand colors with 50-950 scales
colors.brand.primary[500]    // #0ea5e9
colors.brand.secondary[600]  // #475569
colors.brand.accent[500]     // #d946ef

// Semantic colors
colors.semantic.success.main  // #059669
colors.semantic.error.main    // #dc2626
colors.semantic.warning.main  // #d97706
colors.semantic.info.main     // #2563eb

Spacing (8px grid)

import { spacing } from 'design-system';

spacing[4]   // 1rem (16px)
spacing[8]   // 2rem (32px)
spacing[16]  // 4rem (64px)

Typography

import { typography } from 'design-system';

typography.fontFamily.sans
typography.fontSize.base    // 1rem (16px)
typography.fontWeight.bold  // 700

🚀 How to Use in Your Primary Project

Installation

# Install from npm
npm install @dynamic-mockups/design-system @radix-ui/themes react react-dom

# Or with yarn
yarn add @dynamic-mockups/design-system @radix-ui/themes react react-dom

Setup

1. Import CSS Files (REQUIRED)

// In your main App.tsx, main.tsx, or index.tsx
import '@radix-ui/themes/styles.css';
import '@dynamic-mockups/design-system/styles.css';  // ← IMPORTANT: Import design system CSS

2. Wrap with ThemeProvider

import { ThemeProvider } from '@dynamic-mockups/design-system';

function App() {
  return (
    <ThemeProvider
      appearance="light"
      accentColor="blue"
      radius="medium"
    >
      <YourApp />
    </ThemeProvider>
  );
}

3. Use Components

import { Button, Input, Select, Switch, Checkbox } from '@dynamic-mockups/design-system';

function MyPage() {
  return (
    <form>
      <Input
        label="Email"
        type="email"
        placeholder="[email protected]"
        required
      />

      <Select
        label="Country"
        options={[
          { value: 'us', label: 'United States' },
          { value: 'uk', label: 'United Kingdom' },
        ]}
      />

      <Switch label="Remember me" />

      <Checkbox label="I agree to the terms" />

      <Button color="primary" type="submit">
        Submit
      </Button>
    </form>
  );
}

🎨 SCSS Customization

Method 1: Override CSS Variables

Create a custom-theme.scss in your project:

:root {
  // Brand colors
  --color-primary: #0ea5e9;
  --color-primary-hover: #0284c7;
  --color-primary-soft: #e0f2fe;
  
  --color-secondary: #64748b;
  --color-accent: #d946ef;
  
  // Semantic colors
  --color-success: #10b981;
  --color-error: #ef4444;
  --color-warning: #f59e0b;
  --color-info: #3b82f6;
}

Method 2: Use Design Tokens

@use 'design-system' as ds;

.my-component {
  // Use tokens directly in your SCSS
  color: var(--color-primary);
  padding: var(--spacing-4);
  border-radius: var(--radii-lg);
  
  &:hover {
    background-color: var(--color-primary-soft);
  }
}

Method 3: Import Component SCSS

If you want to customize component styles:

// Import and override
@use 'design-system/components/Button/Button.scss' with (
  $button-primary-bg: #your-color
);

📚 Available Scripts

# Development
yarn storybook          # Run Storybook on port 6006
yarn dev                # Run Vite dev server

# Building
yarn build              # Build the library (TS + Vite)
yarn build-storybook    # Build Storybook for deployment

# Quality
yarn typecheck          # Run TypeScript type checking

📦 Build Output

Package Exports

{
  "main": "dist/index.js",       // CommonJS
  "module": "dist/index.mjs",    // ESM
  "types": "dist/index.d.ts",    // TypeScript
  "exports": {
    ".": {
      "types": "./dist/index.d.ts",
      "import": "./dist/index.mjs",
      "require": "./dist/index.js"
    },
    "./styles.css": "./dist/design-system.css"
  }
}

Bundle Sizes

  • ESM: ~186 KB (50 KB gzipped)
  • CJS: ~127 KB (41 KB gzipped)
  • CSS: ~11 KB (1.8 KB gzipped)

🎯 Key Features

Type-Safe - Full TypeScript support with exported types ✅ Tree-Shakeable - Import only what you need ✅ Customizable - SCSS variables and CSS custom properties ✅ Accessible - Built on Radix UI primitives (WCAG compliant) ✅ Token-Based - Consistent design with design tokens ✅ Documented - Comprehensive Storybook documentation ✅ Production Ready - Tested, built, and ready to publish


📖 Next Steps

  1. Run Storybook to see all components:

    yarn storybook
  2. Customize colors in src/tokens/colors.ts

  3. Add more components following the same pattern:

    • Create component folder
    • Add TypeScript component
    • Add SCSS styles
    • Create Storybook stories
    • Export from src/components/index.ts
  4. Test in your primary project using npm link


The system is scalable, maintainable, and follows industry best practices used by companies like Shopify, Atlassian, and GitHub.


Developed by https://dynamicmockups.com