Better system for creating better websites
About methodology and why we should use it!
Atomic design is methodology for creating design systems. There are five distinct levels in atomic design:

Better system for creating better websites
About methodology and why we should use it!
Atomic design is methodology for creating design systems. There are five distinct levels in atomic design:

Applied to web interfaces, atoms are our HTML tags, such as a form label, an input or a button.

Molecules are groups of atoms bonded together and are the smallest fundamental units of a compound. These molecules take on their own properties and serve as the backbone of our design systems.
Building up to molecules from atoms encourages a “do one thing and do it well” mentality. While molecules can be complex, as a rule of thumb they are relatively simple combinations of atoms built for reuse.

We’re starting to get increasingly concrete. A client might not be terribly interested in the molecules of a design system, but with organisms we can see the final interface beginning to take shape.



import styled from '@emotion/styled' const StyledInput = styled('input')` color: grey; font-size: 16px; font-family: inherit; ` export default StyledInputimport styled from '@emotion/styled' const StyledInput = styled('input')` color: grey; font-size: 16px; font-family: inherit; ` export default StyledInput
import styled from '@emotion/styled' const Text = styled('p')` color: black; font-size: 16px; ` export default Textimport styled from '@emotion/styled' const Text = styled('p')` color: black; font-size: 16px; ` export default Text
import styled from '@emotion/styled' import Text from '../atoms/Text' import StyledInput from '../atoms/StyledInput' const TextInput = ({text, ...props}: ITextInput) => ( <div> <Text>{props.text}</Text> <StyledInput {...props} /> </div> ) export default TextInputimport styled from '@emotion/styled' import Text from '../atoms/Text' import StyledInput from '../atoms/StyledInput' const TextInput = ({text, ...props}: ITextInput) => ( <div> <Text>{props.text}</Text> <StyledInput {...props} /> </div> ) export default TextInput
import {Controller} from 'react-hook-form' import TextInput from '../molecules/TextInput' // ... const TextInputQuestion = (props: ITextInputQuestion) => ( <FancyContainer> <Controller control={props.control} name={props.name} defaultValue={''} render={(renderProps, inputProps) => { // Maybe magic ✨ here? Who knows! // Possibilities are endless! return ( <FileInput {...renderProps} {...inputProps} {...props} /> ); }} /> <FancyHr/> </FancyContainer> ) export default TextInputQuestionimport {Controller} from 'react-hook-form' import TextInput from '../molecules/TextInput' // ... const TextInputQuestion = (props: ITextInputQuestion) => ( <FancyContainer> <Controller control={props.control} name={props.name} defaultValue={''} render={(renderProps, inputProps) => { // Maybe magic ✨ here? Who knows! // Possibilities are endless! return ( <FileInput {...renderProps} {...inputProps} {...props} /> ); }} /> <FancyHr/> </FancyContainer> ) export default TextInputQuestion
import Header1 from '../molecules/Header1' import TextInputQuestion from '../organisms/TextInputQuestion' const HomePageView = (props: IHomePageView) => ( <Container> <form onSubmit={props.form.handleSubmit(props.onSubmit)}> <Header1>My super form!</Header1> <TextInputQuestion control={props.form.control} name='firstName' title='Please enter your first name' /> <TextInputQuestion control={props.form.control} name='lastName' title='Please enter your last name' /> <button type='submit'>Submit</button> </form> </Container> ) export default TextInputQuestionimport Header1 from '../molecules/Header1' import TextInputQuestion from '../organisms/TextInputQuestion' const HomePageView = (props: IHomePageView) => ( <Container> <form onSubmit={props.form.handleSubmit(props.onSubmit)}> <Header1>My super form!</Header1> <TextInputQuestion control={props.form.control} name='firstName' title='Please enter your first name' /> <TextInputQuestion control={props.form.control} name='lastName' title='Please enter your last name' /> <button type='submit'>Submit</button> </form> </Container> ) export default TextInputQuestion