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

mini-design-system-fb

v1.0.0

Published

A mini design system with essential components and tokens

Readme

Mini Design System

A lightweight, mini design system built with React and TypeScript. Perfect for rapid prototyping and consistent UI development.

Features

  • Typography Scale: 3 font sizes with Lato font family
  • Color Palette: Teal primary color with semantic colors
  • Spacing System: Consistent 4px-based spacing scale
  • Basic Components: Button, Input, Container, and Stack components
  • TypeScript Support: Full type safety out of the box
  • Zero Dependencies: Only requires React as a peer dependency

Installation

npm install mini-design-system-fb

Usage

Import Components

import { Button, Input, Container, Stack, tokens } from 'mini-design-system-fb';

Button Component

// Primary button
<Button variant="primary" size="md">
  Click me
</Button>

// Secondary button
<Button variant="secondary" size="sm">
  Cancel
</Button>

// Loading state
<Button loading>
  Processing...
</Button>

// Full width
<Button fullWidth>
  Submit
</Button>

Input Component

// Basic input
<Input 
  label="Email" 
  placeholder="Enter your email" 
/>

// With error
<Input 
  label="Password" 
  type="password"
  error="Password is required" 
/>

// With helper text
<Input 
  label="Username" 
  helperText="Must be at least 3 characters" 
/>

// Different sizes
<Input size="sm" placeholder="Small input" />
<Input size="lg" placeholder="Large input" />

Layout Components

// Container for max-width layouts
<Container maxWidth="lg" padding={6}>
  <h1>Page Content</h1>
</Container>

// Stack for flexible layouts
<Stack direction="column" gap={4} align="center">
  <Button>First Button</Button>
  <Button>Second Button</Button>
</Stack>

<Stack direction="row" gap={2} justify="between">
  <Button variant="secondary">Cancel</Button>
  <Button variant="primary">Submit</Button>
</Stack>

Using Design Tokens

import { tokens } from 'mini-design-system-fb';

const customStyles = {
  color: tokens.colors.primary[500],
  fontSize: tokens.typography.fontSize.heading,
  padding: tokens.spacing[4],
  borderRadius: tokens.borderRadius.md,
  boxShadow: tokens.shadows.lg
};

Design Tokens

Colors

  • Primary: Teal color palette (50-900)
  • Gray: Neutral scale (50-900)
  • Semantic: Success, Warning, Error colors
  • Background: Primary and secondary backgrounds
  • Text: Primary, secondary, and inverse text colors

Typography

  • Font Family: Lato with system fallbacks
  • Font Sizes: Small (14px), Body (16px), Heading (24px)
  • Font Weights: Regular (400), Bold (700)
  • Line Heights: Tight (1.25), Normal (1.5), Relaxed (1.75)

Spacing

Based on 4px units with a consistent scale:

  • 1 = 4px
  • 2 = 8px
  • 4 = 16px
  • 8 = 32px
  • etc.

Component Props

Button Props

  • variant: 'primary' | 'secondary'
  • size: 'sm' | 'md' | 'lg'
  • fullWidth: boolean
  • loading: boolean
  • Standard HTML button attributes

Input Props

  • label: string
  • error: string
  • helperText: string
  • size: 'sm' | 'md' | 'lg'
  • fullWidth: boolean
  • Standard HTML input attributes

Container Props

  • maxWidth: 'sm' | 'md' | 'lg' | 'xl' | 'full'
  • padding: number (spacing token key)
  • center: boolean
  • as: HTML element to render

Stack Props

  • direction: 'row' | 'column'
  • gap: number (spacing token key)
  • align: 'start' | 'center' | 'end' | 'stretch'
  • justify: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly'
  • wrap: boolean

Development

# Install dependencies
npm install

# Build the package
npm run build

# Watch for changes during development
npm run dev

License

MIT