Skip to content

nickjmorrow/react-component-library

Repository files navigation

React Component Library

NPM JavaScript Style Guide

The live demo can be found here.

At a Glance

Purpose

I wanted a set of reusable components and styles to use across my personal projects. This component library prioritizes consistent design guidelines while allowing for easy departures.

What I Like About It

  • I'm really happy with the theming implementation. Consumers can describe what colors to use for various palettes, fonts, even spacing. Then, it gets applied to all components. This might be a bit too "wide" for some use cases, but it's been perfect for hobby projects, where I want to tweak the overall feel of a website and don't need to pay attention to specific components.
  • I use TypeScript for anything JS, and I think TS is doing a lot of work in this repo. Components all have TS-described prop definitions that make me feel confident everything's "wired together" appropriately.

What Could Be Different

  • After working on a professional component library, I am 100% convinced that this library would benefit from being packaged at the component-level instead of the library-level. Every component should be it's own package with it's own version and name. This makes it far less disruptive to publish breaking changes, because instead of all breaking changes being in the same package, they're spread out across different component packages, allowing consumers to pick and choose what updates they bring in and how much time they devote to handling breaking changes.
  • Accessibility was not a priority when I was writing this library, but after working with semantic HTML elements, ARIA, and keyboard navigation professionally, I think this would be a fantastic addition to the library.

Install

npm install --save @nickjmorrow/react-component-library

Usage

import * as React from 'react';
import { Typography } from '@nickjmorrow/react-component-library';

const SomeOtherComponent: React.FC = () => {
    return <Typography>Hello, World!</Typography>;
};

License

MIT © nickjmorrow

About

Personal React component library in TypeScript.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published