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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@merutech/react-design-system

v0.1.13

Published

Meru's design system React implementation

Downloads

15

Readme

Ixchel

Meru's design system React implementation

Stack used

  • Typescript
  • Vanilla-extract
  • radix-ui
  • Storybook
  • Jest, testing-library/react

Implementation things to know

  1. Generally, wrap your component in React.forwardRef
  2. Use the right element for the job, don't use a div with onClick if what you want is a button
  3. Allow common dom properties to be passed to underlying component (eg. custom data attributes, aria attributes, common events)

Important things to know

  1. Directory naming and file structure may be a little different to what you're used to. Following rules apply:
    • Directories and files must be named in lower-kebab-case
    • Collocation is desired and expected inside each componente folder, for example, if you were creating a button component:
    button/
      button.tsx <- component lives here
      button.styles.ts <- if you need to take style specific code outside main componente file
      button.stories.tsx <- component stories
      button.test.tsx <- component tests
      index.ts <- barrel file, must export only public api of this component
  2. Commit messages must follow convetional commits format (https://www.conventionalcommits.org/en/v1.0.0/), this is enforced through a commit-msg hook
  3. Aim for the best DX, typescript config is set to strict: true to enforce everything to be fully typed, this is a dev to dev project and complete and correct types eases the implementation.
  4. Implement a design system may look like just writing css at first, but there are many things going on behind scenes:
    • Component API definition: This one is really important and must not be taken lightly, take time to think, research, and discuss with others which approach it's best. Why it's important? Changes to a componente APIs means changes in every project using the component.
    • Research: We are in the way of becoming DS experts, but not quite there yet, take time to investigate existing design systems implemented in react. Some nice examples are Orbit, Braid, Primer and Vibe
    • Typings: It reflects your componente API and enables autocompletion and typesafety in consumer projects.
    • Tests: Always important, a bug in this components library it's a bug in every consumer library.