Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Thinking About React, Atomically

Thinking About React, Atomically

Atomic Design is the concept of breaking down user interfaces into smaller, simpler elements. There are five different levels in atomic design: atoms, molecules, organism, templates, and pages. These levels are combined to make user interfaces.

React, at its core, follows Atomic Design inherently by encouraging developers to keep components as simple and as broken down as possible. From this simplicity, we can create more complex components and containers of components to create the user interfaces for our applications. Following these patterns gives us, as developers, an easy to manage (and test) ecosystem within our React applications.

Katia Wheeler

March 09, 2019
Tweet

Other Decks in Programming

Transcript

  1. Katia Wheeler @KatiaKWheeler /in/katiakwheeler/ katiawheeler.com /katiawheeler Software Engineer ☕ Coffee

    Enthusiast 👾 Gamer Based in Kansas City Primarily work with React & .NET Expert Dabbler Passionate about UX
  2. What We'll Cover What is atomic design? How do we

    create a design system? How does atomic design help my React applications? What are some tools to create a component library utilizing atomic design?
  3. Brad Frost http://bradfrost.com/ Web Designer & Developer Helped redesign Time

    Inc. (Time, Fortune, People, Sports Illustrated), TechCrunch, Entertainment Weekly Passionate about UX Side Projects: Pattern Lab, Styleguides.io, This is Responsive Creator of atomic design
  4. Wanted a system that looked at individual pieces of UI,

    not whole Atomic design was born 👶
  5. What is Atomic Design? "Atomic design is a methodology composed

    of ve distinct stages working together to create interface design systems in a more deliberate and hierarchical manner." Brad Frost
  6. Abstract and Concrete Atomic design provides us the ability to

    quickly shift between the abstract and the concrete
  7. The parts of our design in uence the whole, and

    the whole in uences the parts
  8. "Content needs to be structured and structuring alters your content,

    designing alters content. It’s not ‘content then design’, or ‘content or design’. It’s ‘content and design’" Mark Boulton
  9. out Destinations Get Involved Donate Enter keywords... Search 019 Are

    Volcanoes Really That Dangerous? Read More > Mountains are Climbing Higher Read More > p into nature, and then you will understand everything better." Albert Einstein NTERESTS DVENTURE RAVEL RT AND CULTURE ACKPACKING AMILY HOLIDAYS ESTIVALS OOD AND DRINK OAD TRIPS WILDLIFE AND ATURE ABOUT US WHO WE ARE WHAT WE DO GET INVOLVED DONATE JOIN US CAREERS VOLUNTEER SUBSCRIBE NATURAL WORLD About Destinations Get Involved Donate SEA En Are Volcanoes Really That Dangerous? Or are we just invading their territory? Written by Jane Doe Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis ligula velit, luctus et venenatis in, mollis sit amet nisl. Fusce tincidunt libero ut consequat e congue, sit amet mattis quam luctus. Aenean iaculis tincidunt congue. Nunc maximus ante urna, non commodo ex egestas at. Ut in est nibh. Pellentesqu netus et malesuada fames ac turpis egestas. Nam commodo ipsum non quam rutrum, eu ornare mi suscipit. Nulla pretium nunc in vestibulum malesuad sem nibh e citur tellus, in luctus est eros ac metus. Morbi faucibus purus quis ante tristique, suscipit facilisis dui pharetra. Aliquam lobortis, sem vel fau e citur dolor augue gravida nibh. Proin nunc nulla, volutpat nec magna eget, nibus posuere purus. Nunc tempus augue ac enim lobortis, ac vestibulum justo euismod. Nullam ante nisl, malesuada sed cursus sed, gravida quis felis. Proin egestas elemen dictum posuere, ante lacus consectetur dolor, vel consequat ante lectus non lectus. Proin vel rutrum metus, at volutpat lorem. Vestibulum ut sem sit amet augue tristique pulvinar eget ut lacus. Duis ultrices risus pretium volutpat suscipit. In mauris elit, pretium sed fringilla ut, lacin malesuada quis, congue nec quam. Praesent porta ex a libero dignissim tincidunt. Sed at felis bibendum turpis suscipit tempor at in est. Aliquam sit ame Pellentesque vulputate enim eget tincidunt rhoncus. Praesent eu ante eget magna elementum iaculis. Class aptent taciti sociosqu ad litora torquent per Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vestibulum sed tincidunt nunc, in feugiat est. Aenean orci orc lorem. Nulla pretium iaculis felis, sed tincidunt neque mollis nec. Nullam venenatis lacus a leo hendrerit iaculis. Phasellus vitae mi feugiat, egestas felis a viverra metus. Aliquam accumsan, augue vehicula facilisis feugiat, dui est condimentum dui, e citur rutrum metus nibh vel massa. Vivamus congue pell dignissim. DESTINATIONS AFRICA ANTARCTICA ASIA CENTRAL AMERICA EUROPE NORTH AMERICA PACIFIC SOUTH AMERICA INTERESTS ADVENTURE TRAVEL ART AND CULTURE BACKPACKING FAMILY HOLIDAYS FESTIVALS FOOD AND DRINK ROAD TRIPS WILDLIFE AND NATURE ABOUT US WHO WE ARE WHAT WE DO GET INVOLVED DONATE JOIN US CAREERS VOLUNTEER SUBSCRIBE Save the Great Barrier Reef! You can do your part in helping to save the Great Barrier Reef. Donate today to contribute to conservation and clean up efforts of one of the world's most important natural sites. Donate
  10. NATURAL WORLD About Destinations Get Involved Donate Enter keywords... Search

    Best Forest Hiking of 2019 Read More > Are Volcanoes Really That Dangerous? Read More > Mountains are Climbing Higher Read More > "Look deep into nature, and then you will understand everything better." Albert Einstein DESTINATIONS AFRICA ANTARCTICA ASIA CENTRAL AMERICA EUROPE NORTH AMERICA PACIFIC SOUTH AMERICA INTERESTS ADVENTURE TRAVEL ART AND CULTURE BACKPACKING FAMILY HOLIDAYS FESTIVALS FOOD AND DRINK ROAD TRIPS WILDLIFE AND NATURE ABOUT US WHO WE ARE WHAT WE DO GET INVOLVED DONATE JOIN US CAREERS VOLUNTEER SUBSCRIBE Save the Great Barrier Reef! You can do your part in helping to save the Great Barrier Reef. Donate today to contribute to conservation and clean up efforts of one of the world's most important natural sites. Donate
  11. LOGO About Destinations Get Involved Donate Enter keywords... Search Lorem

    ipsum Read More > Dolor sit amet Read More > Lorem ipsum valor Read More > "Lorem ipsum dolor sit amet, consectetur adipiscing elit." Lorem Ipsum DESTINATIONS AFRICA ANTARCTICA ASIA CENTRAL AMERICA EUROPE NORTH AMERICA PACIFIC SOUTH AMERICA INTERESTS ADVENTURE TRAVEL ART AND CULTURE BACKPACKING FAMILY HOLIDAYS FESTIVALS FOOD AND DRINK ROAD TRIPS WILDLIFE AND NATURE ABOUT US WHO WE ARE WHAT WE DO GET INVOLVED DONATE JOIN US CAREERS VOLUNTEER SUBSCRIBE Lorem Ipsum! Integer nec varius ex, a ultricies lorem. Vivamus sed mi feugiat, dapibus purus sit amet, laoreet massa. Duis eu libero dolor. Lorem ipsum
  12. Organisms HEADER LOGO About Destinations Get Involved Donate SEARCH THE

    SITE Enter keywords... Search HERO BLOG Lorem ipsum Read More > Dolor sit amet Read More > Lorem ipsum valor Read More > Lorem Ipsum! Integer nec varius ex, a ultricies lorem. Vivamus sed mi feugiat, dapibus purus sit amet, laoreet massa. Duis eu libero dolor. Lorem ipsum
  13. Molecules Lorem ipsum Read More > BLOGPOST INTERESTS ADVENTURE TRAVEL

    ART AND CULTURE BACKPACKING FAMILY HOLIDAYS FESTIVALS FOOD AND DRINK ROAD TRIPS WILDLIFE AND NATURE FOOTERNAV
  14. Lorem Ipsum Integer nec varius ex, a ultricies lorem. Vivamus

    sed mi feugiat, dapibus purus sit amet, laoreet massa. Duis eu libero dolor. Lorem ipsum HEROBOX SEARCH THE SITE Enter keywords... Search SEARCH
  15. NATURAL WORLD About Destinations Get Involved Donate Enter keywords... Search

    Best Forest Hiking of 2019 Read More > Are Volcanoes Really That Dangerous? Read More > Mountains are Climbing Higher Read More > "Look deep into nature, and then you will understand everything better." Albert Einstein DESTINATIONS AFRICA ANTARCTICA ASIA CENTRAL AMERICA EUROPE NORTH AMERICA PACIFIC SOUTH AMERICA INTERESTS ADVENTURE TRAVEL ART AND CULTURE BACKPACKING FAMILY HOLIDAYS FESTIVALS FOOD AND DRINK ROAD TRIPS WILDLIFE AND NATURE ABOUT US WHO WE ARE WHAT WE DO GET INVOLVED DONATE JOIN US CAREERS VOLUNTEER SUBSCRIBE Save the Great Barrier Reef! You can do your part in helping to save the Great Barrier Reef. Donate today to contribute to conservation and clean up efforts of one of the world's most important natural sites. Donate
  16. out Destinations Get Involved Donate Enter keywords... Search 019 Are

    Volcanoes Really That Dangerous? Read More > Mountains are Climbing Higher Read More > p into nature, and then you will understand everything better." Albert Einstein NTERESTS DVENTURE RAVEL RT AND CULTURE ACKPACKING AMILY HOLIDAYS ESTIVALS OOD AND DRINK OAD TRIPS WILDLIFE AND ATURE ABOUT US WHO WE ARE WHAT WE DO GET INVOLVED DONATE JOIN US CAREERS VOLUNTEER SUBSCRIBE NATURAL WORLD About Destinations Get Involved Donate SEA En Are Volcanoes Really That Dangerous? Or are we just invading their territory? Written by Jane Doe Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis ligula velit, luctus et venenatis in, mollis sit amet nisl. Fusce tincidunt libero ut consequat e congue, sit amet mattis quam luctus. Aenean iaculis tincidunt congue. Nunc maximus ante urna, non commodo ex egestas at. Ut in est nibh. Pellentesqu netus et malesuada fames ac turpis egestas. Nam commodo ipsum non quam rutrum, eu ornare mi suscipit. Nulla pretium nunc in vestibulum malesuad sem nibh e citur tellus, in luctus est eros ac metus. Morbi faucibus purus quis ante tristique, suscipit facilisis dui pharetra. Aliquam lobortis, sem vel fau e citur dolor augue gravida nibh. Proin nunc nulla, volutpat nec magna eget, nibus posuere purus. Nunc tempus augue ac enim lobortis, ac vestibulum justo euismod. Nullam ante nisl, malesuada sed cursus sed, gravida quis felis. Proin egestas elemen dictum posuere, ante lacus consectetur dolor, vel consequat ante lectus non lectus. Proin vel rutrum metus, at volutpat lorem. Vestibulum ut sem sit amet augue tristique pulvinar eget ut lacus. Duis ultrices risus pretium volutpat suscipit. In mauris elit, pretium sed fringilla ut, lacin malesuada quis, congue nec quam. Praesent porta ex a libero dignissim tincidunt. Sed at felis bibendum turpis suscipit tempor at in est. Aliquam sit ame Pellentesque vulputate enim eget tincidunt rhoncus. Praesent eu ante eget magna elementum iaculis. Class aptent taciti sociosqu ad litora torquent per Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vestibulum sed tincidunt nunc, in feugiat est. Aenean orci orc lorem. Nulla pretium iaculis felis, sed tincidunt neque mollis nec. Nullam venenatis lacus a leo hendrerit iaculis. Phasellus vitae mi feugiat, egestas felis a viverra metus. Aliquam accumsan, augue vehicula facilisis feugiat, dui est condimentum dui, e citur rutrum metus nibh vel massa. Vivamus congue pell dignissim. DESTINATIONS AFRICA ANTARCTICA ASIA CENTRAL AMERICA EUROPE NORTH AMERICA PACIFIC SOUTH AMERICA INTERESTS ADVENTURE TRAVEL ART AND CULTURE BACKPACKING FAMILY HOLIDAYS FESTIVALS FOOD AND DRINK ROAD TRIPS WILDLIFE AND NATURE ABOUT US WHO WE ARE WHAT WE DO GET INVOLVED DONATE JOIN US CAREERS VOLUNTEER SUBSCRIBE Save the Great Barrier Reef! You can do your part in helping to save the Great Barrier Reef. Donate today to contribute to conservation and clean up efforts of one of the world's most important natural sites. Donate
  17. UserInfo.js 1. import React from 'react'; 2. 3. const UserInfo

    = ({ user }) => 4. <div className="UserInfo"> 5. <img className="Avatar" 6. src={user.avatarUrl} 7. alt={user.name} 8. /> 9. <div className="UserInfo-name"> 10. {user.name} 11. </div> 12. </div> 13. 14 export default UserInfo;
  18. Avatar.js 1. import React from 'react'; 2. 3. const Avatar

    = ({ user }) => 4. <img className="Avatar" 5. src={user.avatarUrl} 6. alt={user.name} 7. /> 8. 9. export default Avatar;
  19. UserInfo.js 2. import { Avatar } from '../atoms' 1. import

    React from 'react'; 3. 4. const UserInfo = ({ author }) => 5. <div className="UserInfo"> 6. <Avatar user={author} /> 7. <div className="UserInfo-name"> 8. {author.name} 9. </div> 10. </div> 11. 12. export default UserInfo;
  20. CommentActions.js 1. import React from 'react'; 2. import { Button

    } from '../atoms'; 3. 4. const CommentActions = ({ actions }) => 5. <div className="actions"> 6. <Button onClick={actions.onReply}>Reply</Button> 7. <Button onClick={actions.onFlag}>Flag</Button> 8. <Button onClick={actions.onSave}>Save</Button> 9. </div> 10. 11. export default CommentActions;
  21. Bene ts of Design Systems Promote consistency and cohesion Speed

    up your team’s productivity Establish a more collaborative work ow with a shared vocabulary Serve as a future-friendly foundation
  22. Design systems speed up your team’s work ow by allowing

    you to reuse aspects of user interfaces without having to reinvent the wheel in every project
  23. Centralizing UI elements in a pattern library or component library

    establishes a shared vocabulary for everyone within the organization, not just developers
  24. Design systems make cross-browser/device, performance, and accessibility testing easier, vastly

    speed up production time, and allow teams to launch high-quality work faster
  25. This design system is a living, breathing asset to your

    organization that can be adapted and modi ed based on your organization’s needs.
  26. An interface inventory is a comprehensive collection of the bits

    and pieces that make up your user interface
  27. Steps of an interface audit 1. Gather the Troops 🙋

    🙋 2. Prepare for the Screenshots 📋 3. Screenshots Galore! 📸 4. Sharing is Caring 5. All Aboard! 🚂
  28. 1. Gather the Troops 🙋 🙋 Don’t try and do

    this on your own for three reasons: 1. It can be overwhelming 2. You will miss things 3. Others need to feel your pain 💥🥊
  29. 2. Prepare for the Screenshots 📋 You'll need a place

    to store your screenshots like... PowerPoint or Keynote, Photoshop or Sketch, Evernote Web Clipper, Google Docs, or Microsoft Word
  30. 3. Screenshots Galore! 📸 The interface audit exercise involves screenshotting

    and categorizing all the unique user interface patterns that make up your overall user interface
  31. Some category options include: Global Elements: headers, footers Navigation: main

    nav, footer nav, pagination Images: logos, hero images, avatars, thumbnails Icons: social, arrows, hamburgers, spinners Forms: inputs, text areas, select menus, checkboxes, radio buttons Buttons: primary, secondary, big, small, disabled Headings: h1, h2, h3, h4, h5, h6 Lists: ordered, unordered, striped, lined Interactive Components: accordions, tabs, carousels Messaging: alerts, success, errors, warnings, modals, tooltips Colors: All colors used in site ...
  32. 5. All Aboard! 🚂 Now it's time to get the

    entire organization on board
  33. Bene ts of an interface audit Captures all patterns and

    their inconsistencies Gets organizational buy-in Establishes a scope of work Lays the groundwork to a sound interface design system
  34. Bene ts of an interface audit Captures all patterns and

    their inconsistencies Gets organizational buy-in Establishes a scope of work Lays the groundwork to a sound interface design system
  35. Our job is to create great work for our clients

    and organizations, and interface design systems are a means to that end
  36. Pattern Lab A static site generator (powered by PHP or

    Node) that stitches together UI components
  37. Bene ts of Pattern Lab Nested Patterns Design with Dynamic

    Data Tool Agnostic Language Agnostic Annotations Pattern Starter Kits Versatile Pattern Lineage Documentation Extensible
  38. ├── node_modules/ ├── src/ │ ├── atoms/ │ │ ├──

    Button/ │ │ ├── Input/ │ │ └── Label/ │ ├── molecules/ │ │ └── Search/ │ └── organisms/ │ └── Header/ ├── package.json └── ...
  39. Button.jsx const Button = () => ... export default Button;

    index.js export { default as Button } from './atoms/Button.jsx'
  40. CSS-in-JS makes themes a breeze You can create a custom

    theme, drop it in your <ThemeProvider/> , and all of the child components will inherit the theme's styles
  41. A few bene ts of CSS-in-JS Ensures consistency across your

    applications Allows for nesting and extending styles Quickly change a CSS property based on a JS property
  42. You could set up your own Create React App that

    showcases all of your atomic components