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

@slake-dev/sds

v1.0.1

Published

Using Figma's [Code Connect](https://github.com/figma/code-connect).

Downloads

336

Readme

Simple Design System (alpha)

Using Figma's Code Connect.

Simple Design System (SDS) is a base design system that shows how Figma’s Variables, Styles, Components, and Code Connect can be used alongside a React codebase to form a complete picture of a responsive web design system.

SDS is not just another design system in Figma. There are still many gaps between design and development, and SDS provides some best practices for how to bridge them. SDS tries to remain honest about its implications in code, while also offering customizability in design beyond the simple theming layer that is typical of many code-first component libraries.

Whether you’re looking to use SDS to start a new project, or are looking for examples of some common design systems best practices, you'll find tools inside this codebase and design file to steer you in the right direction.

Resources

Setup

Figma Auth

  • Create a Figma API token
    • Add Code Connect scope
    • Add File Read, Dev Resources Write, and Variables scopes if you want to use the integrations in scripts
    • More on scopes
  • Duplicate .env-rename
  • Rename it to .env, it will be ignored from git.
    • Set FIGMA_ACCESS_TOKEN= as your token in .env
    • Set FIGMA_FILE_KEY= as your file's key (grab it from the file URL) in .env

Code Connect

SDS is fully backed by Figma's Code Connect. This includes examples for how to connect primitives, as well as compositions of those primitives for your design system.

This repo utilizes documentUrlSubstitutions in figma.config.json. This allows us to keep our docs Figma file-agnostic and colocates all the Figma file-specific information for easy url swapping. The document URL substitutions are also named in a way that helps you find the associated component without clicking a link. A key <FIGMA_INPUTS_CHECKBOX_GROUP> is broken down as <FIGMA_[PAGE_NAME]_[COMPONENT_NAME]>.

{
  "documentUrlSubstitutions": {
    "<FIGMA_INPUTS_CHECKBOX_GROUP>": "https://figma.com/design/whatever?node-id=123-456"
  }
}

Allows us to have more expressive URLs in our Code Connect docs:

figma.connect(CheckboxGroup, "<FIGMA_INPUTS_CHECKBOX_GROUP>");

Connecting this repo to a duplicated Figma file

With the above in mind, a fresh clone of the Simple Design System Figma file should maintain all the node-ids. The steps should be as follows:

  • Duplicate the Figma Community File
  • Clone this repo
  • Update urls in figma.config.json to point to your Figma file
    • Note: the file keys (eg. J0KLPKXiONDRssXD1AX9Oi) should be the only change in the urls unless you're creating new components, detaching and recreating.
  • Create and set your Figma Auth Token
  • At that point, npx figma connect publish should work and your new file should have Code Connect.

Structure

All components and styles are in src/ui. Within that directory, code is broken down into a few categories.

src/ui/compositions

Example arrangements of primitive components to demonstrate how you might use SDS to build a responsive website.

src/ui/hooks

Custom React hook definitions

src/ui/icons

All icon components. Automatically generated by scripts/icons

src/ui/images

Placeholder images.

src/ui/layout

Layout components. Crucial to SDS layouts, but do not have analogous component in Figma.

src/ui/primitives

The main component library. SDS primitives can't be reduced further into sub components.

src/ui/providers

Custom React provider definitions

src/ui/utils

Custom utilities and utility components

Code Connect and Storybook

All Code Connect docs and Storybook stories follow the same categorization are defined in src/figma and src/stories.

Scripts

Some example integrations are available in scripts directory. They may require additional API scope that your org may or may not have access to. Where possible, there are some plugin examples to help fill gaps.

scripts/component-metadata

  • Scripts to run in the JS Console in Figma
  • Bulk manage descriptions for all components in the file. Instead of making a complicated plugin, you can do this more simply by running scripts directly from the JavaScript console.
  • Copy the contents of scripts/component-metadata/exportComponentJSON.js and run in the console with the file open.
  • There you can modify descriptions more easily.
  • Once you have modified the descriptions, copy the JSON and paste at the top of scripts/component-metadata/importComponentJSON.js as the value of the json variable.
  • Copy all the contents of the import file and run in the console to batch update descriptions for the entire file.
  • This will only update the descriptions. To update Dev Resources, you can use scripts/dev-resources.

scripts/dev-resources

  • npm run script:dev-resources (REST API only)
  • Sets dev resources for all components described in scripts/dev-resources/devResources.mjs to match.
  • Useful when swapping urls in bulk. Requires Dev Resources: Write scope on your REST API token.

scripts/icons

scripts/tokens