• Stars
    star
    1,771
  • Rank 26,292 (Top 0.6 %)
  • Language
    JavaScript
  • Created about 7 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ”ฌ How the Atomic Design methodology can create a great design system from scratch and make better developers.

atomic design

react-atomic-design

This is a boilerplate with the methodology Atomic Design using a few cool things, like Storybook, Flow and CSS Modules. Feel free to test, change e adapt everything.

Read full article

What is Atomic Design?

Popularly known within the design world, Atomic Design helps to build consistent, solid and reusable design systems. Plus, in the world of React, Vue and frameworks that stimulate the componentization, Atomic Design is used unconsciously; but when used in the right way, it becomes a powerful ally for developers.

The name Atomic Design comes from the idea of separating the components in atoms, molecules, organisms, templates and pages, like in the image above. But what are the responsibilities of each separated part?

Atoms

atoms

Atoms are the smallest possible components, such as buttons, titles, inputs or event color pallets, animations, and fonts. They can be applied on any context, globally or within other components and templates, besides having many states, such as this example of button: disabled, hover, different sizes, etc.

Molecules

molecules

They are the composition of one or more components of atoms. Here we begin to compose complex components and reuse some of those components. Molecules can have their own properties and create functionalities by using atoms, which donโ€™t have any function or action by themselves.

Organisms

organisms

Organisms are the combination of molecules that work together or even with atoms that compose more elaborate interfaces. At this level, the components begin to have the final shape, but they are still ensured to be independent, portable and reusable enough to be reusable in any content.

Templates

templates

In this state we stop composing components and begin to set their context. Moreover, the templates create relationships between the organisms and others components through positions, placements and patterns of the pages but it doesnโ€™t have any style, color or component rendered. Thatโ€™s why it looks like a wireframe.

Pages

pages

Pages are the navigate parts of the application and itโ€™s where the components are distributed in one specific template. The components get real content and theyโ€™re connected with the whole application. At this stage, we can test the efficiency of the design system to analyse if all the components are independent enough or if we need to split them in smaller parts.

React + Atomic Design

When we started to use Atomic Design within React we had to adjust some rules of the methodology to ensure that components were reused as much as possible, that they were stateless, without styles of positions and very specific margins so to avoid any side effects in the pages of application.

So with each new component we asked ourselves: โ€œAre these components generic enough to avoid specificity and/or repeated code in whatever context they are used?โ€

So we were able to write a few rules:

  • The Atomic Design should have a file of variables and it must be imported by each component;
  • The atoms should be written without margins and positions;
  • Only the molecules and organisms can set the positions of atoms, but these stacks canโ€™t have any styles of margins and positions;
  • Templates have only one function: to set the grid of pages but never positions of specific components;
  • Pages render the components with a template defined and itโ€™s here that the Atomic Design will be connected to the rest of the application;

Scripts

Script Desc
$ yarn start Start a simple webpack server
$ yarn dev Create a server to development at port 5000
$ yarn storybook Start Storybook with the stories imported
$ yarn flow Validate the flow types

Libraries

  • Webpack
    • CSS Loader
    • SVG Sprite loader
    • File loader
  • Flow types
  • Storybook
    • Storybook Info
  • CSS
    • Autoprefixer
    • Import
    • Nested
    • Variables
    • Inline SVG
  • Babel
    • Loader
    • Preset ES2015
  • Project
    • Atomic Design styles folder structure
    • ESLint
    • Prettier

Contributors

@danilowoz

@dleitee

License

MIT

More Repositories

1

react-content-loader

โšช SVG-Powered component to easily create skeleton loadings.
TypeScript
13,628
star
2

create-content-loader

โœ๏ธ Tool to create your own react-content-loader easily.
JavaScript
1,224
star
3

coverify

๐ŸŽง Web tool that creates album artworks for Spotify playlists, where different fonts, colors, and a ton of images can be applied.
TypeScript
222
star
4

spatial-keyboard-navigation

A visual hierarchy approach to navigate through selectable elements on a page.
TypeScript
221
star
5

wipe.css

๐Ÿšฟ Stop suffering and resetting styles for every new project. This is a library to reset default styles with some opinionated changes, that you might love (or not).
CSS
113
star
6

I-don-t-know-how-to-name-my-function

๐Ÿค” Development can be more challenging than you think. It is not about algorithms or data structures, but about naming functions and variables!
TypeScript
75
star
7

gatsby-advanced-blog-system

๐Ÿ“ฐ This repository is a demo from the article about how to build our own blog using Gatsby.
JavaScript
66
star
8

create-vue-content-loader

โœ๏ธ Tool to create your own content loader easily in Vue.
JavaScript
60
star
9

react-native-styl

๐Ÿ’… Micro-library that writes stylesheets with a non-opinionated approach, free of dependencies, and in the easiest way possible.
TypeScript
41
star
10

danilowoz.com

Astro
36
star
11

ts-gql-jsx

https://danilowoz.com/blog/generating-typescript-types-and-react-hooks-based-on-graphql-endpoint
TypeScript
27
star
12

sandpack-tsserver

Created with CodeSandbox
TypeScript
14
star
13

my-styled-component

๐Ÿ’… My own implementation of styled-components within 100 lines of code.
JavaScript
9
star
14

hype-todolist

๐Ÿ”ฆ A todo list using Redux, GraphQL, Apollo, Webpack and Postcss from scratch
JavaScript
5
star
15

ide-concept

Created with CodeSandbox
TypeScript
4
star
16

Vuesualizen

๐ŸŽฏ The Vuesualizen will be a Chrome Extension that helps you attract your life goals by automatically showing it to you every day as a new tab in the browser.
JavaScript
4
star
17

myzshrc

2
star
18

create-react-content-loader

HTML
2
star
19

JavaScript-Design-Patterns

HTML
2
star
20

barcode-playground

HTML
2
star
21

fileupload-react

Just another playground in React
JavaScript
2
star
22

reason-movie-app

Reason
2
star
23

talkey

My version of ReactJs
JavaScript
1
star
24

monorepo-semantic-release

TypeScript
1
star
25

github-block-examples

1
star
26

github-actions-for-packages

JavaScript
1
star