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

dof-ui

v1.0.0

Published

DoF Design System - React UI components

Downloads

100

Readme

DoF Design System - Storybook

A comprehensive design system for Data & AI products, auto-generated from Figma and documented with Storybook.

🎯 Overview

This project automatically extracts design tokens and components from the DoF UI Library in Figma and generates a complete Storybook documentation site with production-ready React components.

Inspired by IBM Carbon Design System, this design system provides:

  • 🎨 Design Tokens - Colors, typography, spacing extracted from Figma
  • 🧩 Component Library - Reusable React components
  • 📊 Data Visualization - Charts and data display components
  • 💬 Conversational UI - Chat and interaction components
  • Accessibility - WCAG 2.1 AA compliant
  • 📚 Documentation - Comprehensive Storybook docs

📁 Project Structure

dof-storybook/
├── .storybook/          # Storybook configuration
├── docs/                # Documentation pages (MDX)
├── scripts/             # Build and extraction scripts
│   ├── extract-figma-tokens.js
│   └── extract-figma-components.js
├── src/
│   ├── components/      # React components
│   │   ├── basic/       # Basic components (Button, Input, etc.)
│   │   ├── data-viz/    # Data visualization components
│   │   └── conversational/  # Chat and conversational UI
│   ├── tokens/          # Design tokens (auto-generated)
│   │   ├── tokens.json
│   │   ├── tokens.css
│   │   └── tokens.js
│   ├── assets/          # Icons, images
│   └── utils/           # Utility functions
└── package.json

🚀 Quick Start

Prerequisites

  • Node.js >= 18.0.0
  • npm or yarn
  • Figma access token

Installation

  1. Clone the repository:
cd /Users/alberto.delapuente/projects/dof-storybook
  1. Install dependencies:
npm install
  1. Configure Figma credentials:
# .env is already configured with:
FIGMA_TOKEN=your_token_here
FIGMA_FILE_KEY=WrkiQCkVu5aikjyMs9Ufaq
  1. Extract design tokens from Figma:
npm run extract-tokens
  1. Start Storybook:
npm run storybook

Visit http://localhost:6006 to view the Storybook!

📊 Figma Structure

The DoF UI Library in Figma is organized into:

  • Logo - Brand identity
  • Colors - Color palette and themes
  • Typography - Font scales and text styles
  • Layout - Grid system and spacing
  • Iconography - Icon library
  • Components: Basic - Buttons, inputs, cards, etc.
  • Components: Data Visualisation - Charts, graphs, tables
  • Components: Conversational - Chat bubbles, messages, etc.

🛠️ Available Scripts

| Script | Description | |--------|-------------| | npm run storybook | Start Storybook dev server on port 6006 | | npm run build-storybook | Build static Storybook for deployment | | npm run extract-tokens | Extract design tokens from Figma | | npm run extract-components | Extract component specs from Figma |

🎨 Design Tokens

Design tokens are automatically extracted from Figma and available in multiple formats:

  • JSON - src/tokens/tokens.json - Raw token data
  • CSS - src/tokens/tokens.css - CSS custom properties
  • JavaScript - src/tokens/tokens.js - JS/TS exports

Usage Example

/* Using CSS variables */
.button {
  background-color: var(--color-primary);
  font-size: var(--font-size-body);
  padding: var(--spacing-04);
}
// Using JS tokens
import { colors, typography, spacing } from './tokens/tokens.js';

const styles = {
  backgroundColor: colors.primary.value,
  fontSize: typography.body.fontSize,
  padding: spacing['spacing-04'].value
};

🧩 Component Development

Creating a New Component

  1. Create component directory:
mkdir -p src/components/basic/MyComponent
  1. Create component files:
MyComponent/
├── MyComponent.jsx       # Component implementation
├── MyComponent.css       # Styles
├── MyComponent.stories.jsx  # Storybook stories
├── MyComponent.test.jsx  # Tests
└── index.js              # Exports
  1. Follow Carbon Design System patterns for consistency

Component Documentation

Each component should include:

  • Props table - All available props with types and defaults
  • Usage examples - Common use cases
  • Accessibility notes - ARIA attributes, keyboard navigation
  • Design guidelines - When and how to use the component
  • Figma link - Link to component in Figma library

📖 Documentation

Documentation is written in MDX and organized by:

  • Foundations - Design principles, tokens, guidelines
  • Components - Individual component docs
  • Patterns - Common patterns and best practices
  • Resources - Links, tools, changelog

♿ Accessibility

All components follow:

  • WCAG 2.1 AA compliance
  • Keyboard navigation support
  • Screen reader compatibility
  • Color contrast requirements (4.5:1 minimum)
  • Focus indicators
  • Semantic HTML

Use the @storybook/addon-a11y to test accessibility in Storybook.

🚢 Deployment

Build the static Storybook:

npm run build-storybook

Output will be in storybook-static/ directory, ready for deployment to:

  • GitHub Pages
  • Netlify
  • Vercel
  • Any static hosting service

🔗 Links

📝 License

MIT

👥 Contributors

  • Alberto de la Puente - Initial work

Built with ❤️ using Storybook, React, and the Figma API