Component Library Starter

screenshot of Component Library Starter
react
styled-components

Component Library Starter

a small starter for building a component library with styled-components

Overview

The Component Library Starter is a small starter kit for building a component library using styled-components. It is designed to help users create their own components and easily publish them to npm. The library is set up to use styled-components, polished, and styled-components-modifiers.

Features

  • Integration with styled-components, polished, and styled-components-modifiers
  • File structure based on Blocks, Elements, and Modifiers concept
  • Linting for JavaScript and SCSS
  • Initial test suite using Jest

Installation

To install the component library starter and its dependencies with Yarn, run the following command:

yarn install

If you prefer to use npm, you can use the following command instead:

npm install

Summary

The Component Library Starter provides a convenient starting point for building a component library using styled-components. It offers integration with popular libraries like polished and styled-components-modifiers, a file structure based on the Blocks, Elements, and Modifiers concept, and support for linting and testing. By following the provided guidelines, users can easily create their own components and publish them to npm.

react
React

React is a widely used JavaScript library for building user interfaces and single-page applications. It follows a component-based architecture and uses a virtual DOM to efficiently update and render UI components

styled-components
Styled Components

Styled Components is a popular library for styling React components using CSS syntax. It allows you to write CSS in your JavaScript code, making it easier to create dynamic styles that are specific to each component.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

Stylelint

Stylelint is a modern linter for CSS that helps you avoid errors and enforce consistent styling conventions. It provides rules for detecting errors and warnings, and can be configured to match your specific project's requirements.

webpack
Webpack

Webpack is a popular open-source module bundler for JavaScript applications that bundles and optimizes the code and its dependencies for production-ready deployment. It can also be used to transform other types of assets such as CSS, images, and fonts.