<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dominic Nguyen</title>
    <description>The latest articles on DEV Community by Dominic Nguyen (@domyen).</description>
    <link>https://dev.to/domyen</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F21787%2Fccd83fc1-15a8-4b69-8827-69ef817e00ef.jpg</url>
      <title>DEV Community: Dominic Nguyen</title>
      <link>https://dev.to/domyen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/domyen"/>
    <language>en</language>
    <item>
      <title>Introducing LearnStorybook.com</title>
      <dc:creator>Dominic Nguyen</dc:creator>
      <pubDate>Tue, 10 Apr 2018 13:01:01 +0000</pubDate>
      <link>https://dev.to/chroma/introducing-learnstorybookcom-1k6d</link>
      <guid>https://dev.to/chroma/introducing-learnstorybookcom-1k6d</guid>
      <description>&lt;h4&gt;
  
  
  A tutorial that teaches you Storybook by building a working UI
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;TLDR:&lt;/strong&gt; 👋 Dev.to we’re launching &lt;a href="https://www.learnstorybook.com/"&gt;&lt;strong&gt;Learn Storybook&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt; &lt;/strong&gt; — a fast, approachable, and free tutorial to get started with Storybook. Whether you're a new or experienced frontend developer, this tutorial gives you a head start learning the UI component tool used by professional teams. Includes real code commits synced to chapters to make it easy to keep up.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.learnstorybook.com/"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Zr_fQzwS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2Au5fKA8sePfQ8RVJylSPJTg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you work on the frontend like me you may have heard of Storybook (originally called React Storybook). At first you probably dismissed it. Another day, another dev tool.&lt;/p&gt;

&lt;p&gt;Yet an increasing number of developers and savvy designers use Storybook to build UIs. Teams at Airbnb, Dropbox, IBM, Lonely Planet, and Mozilla rely on it everyday. And Storybook has grown beyond React to support nearly every major view layer. By now, you might be wondering what the hype is all about?&lt;/p&gt;

&lt;h2&gt;
  
  
  A tool for the future of UI development
&lt;/h2&gt;

&lt;p&gt;To make sense of Storybook let’s take a brief detour to the frontend landscape. UI development is undergoing a renaissance inspired by new view layers like React, Vue, and Angular.&lt;/p&gt;

&lt;p&gt;Folks no longer think in pages but in components. Components still output the familiar HTML, CSS, and JavaScript triumvirate, but the means of generating that output has evolved.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--U_N5pOTu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn-images-1.medium.com/max/600/1%2Ag_NWhiyrHR2URLtR12waVg.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--U_N5pOTu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn-images-1.medium.com/max/600/1%2Ag_NWhiyrHR2URLtR12waVg.gif" alt=""&gt;&lt;/a&gt;Throw attributes at a component and watch it render different permutations.&lt;/p&gt;

&lt;p&gt;With React, developers have new tools like &lt;strong&gt;props&lt;/strong&gt; , &lt;strong&gt;context&lt;/strong&gt; , and &lt;strong&gt;state&lt;/strong&gt; to render UI. The core innovation shared by these “modern” view layers is the component construct which makes it easy to break down complex UIs into simple modules.&lt;/p&gt;

&lt;p&gt;Component-oriented development requires new tooling to help developers concentrate on building UI components. Storybook is the most popular and fully featured UI component tool. It’s also the only tool that supports most view layers.&lt;/p&gt;

&lt;h2&gt;
  
  
  OK, but what does Storybook do?
&lt;/h2&gt;

&lt;p&gt;Storybook helps you build durable UIs faster. It runs alongside your app in development mode and provides a “sandbox” to build UI components in isolation of business logic or context from your app. This allows you to focus on clearly defining the component API –the set of inputs a component takes.&lt;/p&gt;

&lt;p&gt;Developers create “stories” by passing a unique set of inputs to a component to yield different variations (similar to specs in unit testing). These stories are indexed and documented in Storybook so you can visually check on them during development or revisit later during testing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RBZA_Lyj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2Ae0qaK7VJ7HnAnMvEit1C0Q.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RBZA_Lyj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2Ae0qaK7VJ7HnAnMvEit1C0Q.jpeg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://www.learnstorybook.com/"&gt;Learn Storybook&lt;/a&gt; — a hands-on tutorial
&lt;/h2&gt;

&lt;p&gt;More frontend teams than ever rely on Storybook. But there aren’t many resources on &lt;strong&gt;how to use Storybook from first principles.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://twitter.com/tmeasday"&gt;Tom Coleman&lt;/a&gt; and &lt;a href="http://twitter.com/domyen"&gt;I&lt;/a&gt; created Learn Storybook, a free 9 chapter tutorial, to teach tried-and-true patterns for component development using Storybook.&lt;/p&gt;

&lt;p&gt;You’ll walk through essential UI component techniques while building a UI from the ground up in Storybook (great for project-based learners).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4QFQnpog--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2A4IrlYDsMEI2LgV20_FVB-g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4QFQnpog--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2A4IrlYDsMEI2LgV20_FVB-g.png" alt=""&gt;&lt;/a&gt;Build Taskbox, a task management UI&lt;/p&gt;

&lt;h3&gt;
  
  
  What you’ll learn
&lt;/h3&gt;

&lt;p&gt;You’ll learn best practices sourced from professional teams, core maintainers, and the fantastic Storybook community. In addition, get the wider context to understand why those best practices exist. Each chapter walks through different aspects of using Storybook and is synced to a &lt;strong&gt;real commit&lt;/strong&gt; in a working demo app.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🏗 Setup the development environment&lt;/li&gt;
&lt;li&gt;🔨 Build a simple component in isolation&lt;/li&gt;
&lt;li&gt;🛠 Assemble a composite component out of simple components&lt;/li&gt;
&lt;li&gt;💡 Wire in data with containers&lt;/li&gt;
&lt;li&gt;💻 Construct a screen&lt;/li&gt;
&lt;li&gt;🚦 Test a UI component library&lt;/li&gt;
&lt;li&gt;🚀 Deploy Storybook&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Who this is great for
&lt;/h3&gt;

&lt;p&gt;Storybook should be approachable to everyone whether you’re senior, junior, developer, or designer. If you follow along, you’ll grasp the core concepts of isolated UI component development and build a full UI in Storybook without a problem. It’s great for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;👩‍💻 Experienced developers&lt;/strong&gt; who have heard of Storybook and want an efficient tutorial that highlights key features and workflow&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;👩‍🎓 New developers&lt;/strong&gt; who want to learn a tool used by professional teams at Github, Artsy, and Priceline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;👩‍🎨 Product designers&lt;/strong&gt; interested in UI components and the nuts &amp;amp; bolts of building component libraries.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope &lt;a href="https://www.learnstorybook.com/"&gt;&lt;strong&gt;Learn Storybook&lt;/strong&gt;&lt;/a&gt; helps you, well, learn Storybook!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LN20Ka4f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/64/1%2AGtyOd4Uan21s07cExngbrg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LN20Ka4f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/64/1%2AGtyOd4Uan21s07cExngbrg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Contributors welcome
&lt;/h2&gt;

&lt;p&gt;Learn Storybook is &lt;a href="https://github.com/hichroma/learnstorybook.com/"&gt;open source&lt;/a&gt;. Our goal is to introduce Storybook to the world. We’re looking for &lt;a href="https://www.learnstorybook.com/contribute/"&gt;Vue and Angular contributors&lt;/a&gt; (the example code is currently React) and help &lt;a href="https://github.com/hichroma/learnstorybook.com/issues/3"&gt;translating the tutorial&lt;/a&gt; to other languages. Also report bugs!&lt;/p&gt;

&lt;p&gt;Originally published at &lt;a href="https://blog.hichroma.com/introducing-learnstorybook-com-2a43cd33edf5"&gt;Chroma&lt;/a&gt;&lt;/p&gt;




</description>
      <category>react</category>
      <category>components</category>
      <category>storybook</category>
      <category>styleguide</category>
    </item>
    <item>
      <title>Hi, I'm Dominic Nguyen</title>
      <dc:creator>Dominic Nguyen</dc:creator>
      <pubDate>Mon, 12 Jun 2017 17:12:21 +0000</pubDate>
      <link>https://dev.to/domyen/hi-im-dominic-nguyen</link>
      <guid>https://dev.to/domyen/hi-im-dominic-nguyen</guid>
      <description>&lt;p&gt;I live in San Francisco and do product design at Chroma. I âœï¸ on design, UI engineering, and sometimes motorcycles. Previously &lt;a class="mentioned-user" href="https://dev.to/meteorjs"&gt;@meteorjs&lt;/a&gt;, @percolatestudio partner, and @yummly.&lt;/p&gt;

&lt;p&gt;Nice to meet you.&lt;/p&gt;

</description>
      <category>introduction</category>
    </item>
    <item>
      <title>Beyond Bootstrap –moving from UI toolkit to component library</title>
      <dc:creator>Dominic Nguyen</dc:creator>
      <pubDate>Tue, 06 Jun 2017 15:01:01 +0000</pubDate>
      <link>https://dev.to/chroma/beyond-bootstrap-moving-from-ui-toolkit-to-component-library</link>
      <guid>https://dev.to/chroma/beyond-bootstrap-moving-from-ui-toolkit-to-component-library</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F986%2F1%2AUMdYa8Cvv7nncxtz6CwB-w.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F986%2F1%2AUMdYa8Cvv7nncxtz6CwB-w.jpeg"&gt;&lt;/a&gt;Image: &lt;a href="http://www.spatialagency.net/database/haus-rucker-co" rel="noopener noreferrer"&gt;Haus-Rucker-Co&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first factory predates the industrial revolution by hundreds of years. &lt;a href="https://en.wikipedia.org/wiki/Venetian_Arsenal" rel="noopener noreferrer"&gt;Venice’s Arsenal&lt;/a&gt; pioneered assembling naval ships out of standardized parts. Engineers of the time discovered that it was quicker and easier to &lt;em&gt;assemble&lt;/em&gt; complex things from their constituent parts rather than &lt;em&gt;build&lt;/em&gt; them from scratch. Today, we’re seeing this idea of &lt;a href="https://blog.hichroma.com/prefabricated-components-2932bfc992ba" rel="noopener noreferrer"&gt;prefabrication&lt;/a&gt; and assembly take hold in a different sphere of engineering: building user interfaces.&lt;/p&gt;

&lt;p&gt;User interfaces are increasingly assembled from standardized parts. &lt;strong&gt;UI toolkits&lt;/strong&gt; like &lt;a href="https://getbootstrap.com" rel="noopener noreferrer"&gt;Bootstrap&lt;/a&gt; were among the first to provide a generic collection of parts for web UIs. These toolkits enabled developers to easily find and apply patterns in their apps.&lt;/p&gt;

&lt;p&gt;Companies too recognized the value of having their own UI toolkit. They created &lt;strong&gt;living styleguides&lt;/strong&gt; to match the look and feel of their brands. However, building a styleguide requires significant resources so only larger teams tended to invest in them.&lt;/p&gt;

&lt;p&gt;A key change in the industry has come with the advent of &lt;strong&gt;UI&lt;/strong&gt;  &lt;strong&gt;components&lt;/strong&gt; â€Š–â€Šbuilding blocks of user interface akin to Legos. Components simplify building custom UI toolkits because they encapsulate design patterns in modular standardized units.&lt;/p&gt;

&lt;p&gt;This paradigm shift allows teams of any size to create “ &lt;strong&gt;component libraries&lt;/strong&gt;  tailored to their exact needs and brand. Today, I’ll walk through how we got here and the process of creating your own component library.&lt;/p&gt;

&lt;h2&gt;
  
  
  User interface assembly
&lt;/h2&gt;

&lt;p&gt;Frontend developers build the same user interfaces over and over. There aren’t many &lt;em&gt;functional&lt;/em&gt; differences between them. You’ll usually find the standard combination of header, sidebar, lists, and forms.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F600%2F1%2AHUUqhC5phoYZFWR4n8VDWg.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F600%2F1%2AHUUqhC5phoYZFWR4n8VDWg.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Throughout history people have found that it’s more productive if people assemble new products from existing parts. User interface engineering is no exception. Composing new views out of existing UI parts is faster than building them from the ground up.&lt;/p&gt;

&lt;p&gt;At first these patterns took the form of ad hoc code snippets. They lived in text files stashed somewhere on developers’ machines (pre-Github). Albeit not very shareable, these bits of UI code had enormous utility to the frontend developer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bootstrap and UI toolkits
&lt;/h2&gt;

&lt;p&gt;Bootstrap came along and consolidated these pieces of UI code into a single well-documented collection. The key idea of UI toolkits was to provide an inventory of generic/universal &lt;strong&gt;design patterns&lt;/strong&gt; (with accompanying code).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F1%2AKG74W9pMhj29IfkNoCZAwA.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F1%2AKG74W9pMhj29IfkNoCZAwA.jpeg"&gt;&lt;/a&gt;Bootstrap’s designÂ patterns&lt;/p&gt;

&lt;p&gt;At the time, the workflow was revolutionary in its simplicity. You copy–pasted markup and got workable user interfaces. UI toolkits made it trivial to scaffold simple sites and line-of-business apps.&lt;/p&gt;

&lt;p&gt;The concept of UI toolkits had an enormous impact on design and development. It proved that designers could ensure user interface consistency throughout the development process. It also highlighted how easy it could be to create UIs using a toolkit to developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Living styleguides
&lt;/h2&gt;

&lt;p&gt;Living styleguides are organization-specific UI toolkits. Teams saw the inherent value in UI toolkits, but often had specific look and feel requirements. They couldn’t just adopt Bootstrap, Foundation, or Semantic.&lt;/p&gt;

&lt;p&gt;The classic downside of something like Bootstrap is that you must adhere to its prescribed idioms and styles. Sites that rely on popular toolkits tend to look the same. You can probably see why this isn’t ideal for a company looking to stand out in the market.&lt;/p&gt;

&lt;p&gt;Like Bootstrap, living styleguides provided a similar inventory of design patterns along with code, but these patterns reflected the particulars of company branding and design.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://walmartlabs.github.io/web-style-guide/#buttons" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F1%2Apfc0_uCd1d1DpdK3-EtUXg.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At the scale of &lt;a href="https://www.yelp.com/styleguide#buttons" rel="noopener noreferrer"&gt;Yelp&lt;/a&gt;, &lt;a href="https://walmartlabs.github.io/web-style-guide/#buttons" rel="noopener noreferrer"&gt;Walmart&lt;/a&gt; or the &lt;a href="http://codeforamerica.clearleft.com/" rel="noopener noreferrer"&gt;US government&lt;/a&gt;, reusing existing design patterns yielded massive efficiency gains. Living styleguides made it easy for big companies to create a consistent look and feel &lt;em&gt;across&lt;/em&gt; their web properties.&lt;/p&gt;

&lt;p&gt;However, creating a living styleguide is a significant undertakingâ€Š–â€Šoften requiring coordination from the top down. There are countless UI permutations to design, build, and maintain accompanied by the daunting task of getting buy-in from everyone on the team. Realistically, the luxury of living styleguides was reserved only for large teams.&lt;/p&gt;

&lt;h2&gt;
  
  
  Component libraries
&lt;/h2&gt;

&lt;p&gt;Component libraries are a pragmatic way for teams –large &lt;em&gt;and&lt;/em&gt; small– to get the ease of Bootstrap, the customizability of living styleguides, and the flexibility of modern view layer technology.&lt;/p&gt;

&lt;p&gt;The widespread adoption of view layers like React, Angular, and Vue compel teams to decompose UIs into simple components. These components serve as the building blocks of apps; the collection of components is the basis of a component library.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F800%2F1%2AUsivbxsBxiiltJ2dYjniqA.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F800%2F1%2AUsivbxsBxiiltJ2dYjniqA.gif"&gt;&lt;/a&gt;A self-contained &lt;a href="http://airbnb.io/react-dates/" rel="noopener noreferrer"&gt;DatePicker&lt;/a&gt; component&lt;/p&gt;

&lt;h3&gt;
  
  
  Components: self-contained functionality
&lt;/h3&gt;

&lt;p&gt;As a construct, components are more powerful &lt;em&gt;and&lt;/em&gt; easier to use abstractions than raw code. They are self-contained pieces of functionality that have well-defined inputs and outputs.&lt;/p&gt;

&lt;p&gt;Self-containment encourages developers to scope functionality, markup, and styling(this area is &lt;a href="https://medium.com/seek-blog/a-unified-styling-language-d0c208de2660" rel="noopener noreferrer"&gt;rapidly evolving&lt;/a&gt;) at the component-level. No need to rely on toolkit-level JavaScript or stylesheets, with UI components all of this can be encapsulated in the component.&lt;/p&gt;

&lt;h3&gt;
  
  
  Small teams can build component libraries
&lt;/h3&gt;

&lt;p&gt;The focus on components –the user interface equivalent to Legos– makes it easy for small teams and individuals to start building their own inventory of custom design patterns &lt;strong&gt;piecemeal&lt;/strong&gt;. Since you progressively accumulate UI components, the startup cost of a component library turns out to be less than building a living styleguide (which often requires much forethought and planning).&lt;/p&gt;

&lt;p&gt;In addition, flexibility is inherent to component libraries. Each component can be added, updated, or replaced without affecting the integrity of the library. This means that you’re not constrained to one UI toolkit at a time, you can mix, match, and customize components from around the web as needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do I get started?
&lt;/h2&gt;

&lt;p&gt;Whether you have an existing app with components or are building one anew, starting to accrue the benefits of a component library is easy. Since you’re able to add components individually and the tools to build libraries tend to be &lt;em&gt;development-only&lt;/em&gt; by default, the cost to try a component library is close to nil. Let’s see how to get started in 4-steps.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Get a place to “store your components.
&lt;/h4&gt;

&lt;p&gt;Components are often buried inside apps. This isn’t ideal because people have to scour through directories and screens to see components in action. What you want is a central place to catalog and visualize your components. You can find these library-like features in a &lt;a href="https://blog.hichroma.com/the-crucial-tool-for-modern-frontend-engineers-fb849b06187a" rel="noopener noreferrer"&gt;component explorer&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F992%2F1%2AjTl0e2sNMfJQX3znZULmEA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F992%2F1%2AjTl0e2sNMfJQX3znZULmEA.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Component explorers
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;React:&lt;/strong&gt; &lt;a href="https://github.com/storybooks/storybook" rel="noopener noreferrer"&gt;Storybook&lt;/a&gt;, &lt;a href="https://github.com/react-cosmos/react-cosmos" rel="noopener noreferrer"&gt;Cosmos&lt;/a&gt;, &lt;a href="https://github.com/carteb/carte-blanche" rel="noopener noreferrer"&gt;Carte Blanche&lt;/a&gt;, &lt;a href="https://react-styleguidist.js.org/" rel="noopener noreferrer"&gt;Styleguidist&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Angular:&lt;/strong&gt; &lt;a href="https://github.com/ui-storybook/sb" rel="noopener noreferrer"&gt;UI Storybook&lt;/a&gt;, &lt;a href="http://www.angularplayground.it/" rel="noopener noreferrer"&gt;Playground&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vue:&lt;/strong&gt; &lt;a href="https://github.com/vue-play/vue-play" rel="noopener noreferrer"&gt;Vue play&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ember:&lt;/strong&gt; &lt;a href="https://chrislopresto.github.io/ember-freestyle/" rel="noopener noreferrer"&gt;Freestyle&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clojure:&lt;/strong&gt; &lt;a href="https://github.com/bhauman/devcards" rel="noopener noreferrer"&gt;Devcards&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Meteor:&lt;/strong&gt; &lt;a href="https://github.com/meteor/chromatic/" rel="noopener noreferrer"&gt;Chromatic&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  2. Index existing components
&lt;/h4&gt;

&lt;p&gt;Once you get a component explorer, it’s time to index your app’s existing components so they can be found.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F800%2F1%2AzmoiFngqTlycnY7k4IK-VQ.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F800%2F1%2AzmoiFngqTlycnY7k4IK-VQ.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Start by importing the component explorer tool at the top of your component file (the exact syntax varies between component explorersâ€Š–â€ŠI’m simplifying for readability).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;import { specsOf } from â€˜@component-explorer/explorer’;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Next, write your first “test states for that component as specs. For instance a Toggle component might have default and active state.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;specsOf(â€˜Toggle’) 
  .add(â€˜default’, () =&amp;gt; &amp;lt;Toggle active={false} /&amp;gt;) 
  .add(â€˜active’, () =&amp;gt; &amp;lt;Toggle active={true} /&amp;gt;)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then checkout the component in action via the component explorer. Repeat this process to index other components and grow your library.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F900%2F1%2AAw8z6q9HDZVQRNWcq8GK4A.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F900%2F1%2AAw8z6q9HDZVQRNWcq8GK4A.gif"&gt;&lt;/a&gt;A toggle component in Storybook&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Browse thousands of open source components
&lt;/h4&gt;

&lt;p&gt;There are plenty of readymade UI components available from organizations like &lt;a href="https://medium.com/u/e7b0f31549dd" rel="noopener noreferrer"&gt;Salesforce&lt;/a&gt;, &lt;a href="https://medium.com/u/ebe93072cafd" rel="noopener noreferrer"&gt;AirbnbEng&lt;/a&gt;, and &lt;a href="https://medium.com/u/991272e72e68" rel="noopener noreferrer"&gt;Google&lt;/a&gt;. Familiar UI toolkits like Bootstrap and Foundation have also been converted to UI components. For complex components like graphs, I suggest browsing what is already available before building something from scratch.&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Add open source components to your library.
&lt;/h4&gt;

&lt;p&gt;Once you’ve found something you like, it’s time to put it in the component explorer (as we did in step 2). This gives you an isolated playground to tweak the readymade component before integrating it into your app.&lt;/p&gt;

&lt;p&gt;Let’s simulate the process of adding an example LineGraph component to the library.&lt;/p&gt;

&lt;p&gt;Installing via NPM: &lt;code&gt;npm install linegraph&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Create a new file to import the component, the component explorer, and record the test states as specs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { specsOf } from â€˜@component-explorer/explorer’;
import LineGraph from 'linegraph';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add a few test states to adjust the look and feel in isolation with your component explorer. Here’s how the component would look with a default and active state:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;specsOf('LineGraph')  
  .add('Default', () =&amp;gt; 
    &amp;lt;LineGraph data={latencies.map(latency =&amp;gt; ({    
      latency,
      count: 5000 + Math.random() * 15000,  
  }))} /&amp;gt;)

.add('Active', () =&amp;gt; 
    &amp;lt;LineGraph active={true} data={latencies.map(latency =&amp;gt; ({    
      latency,
      count: 5000 + Math.random() * 15000,  
  }))} /&amp;gt;)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F980%2F1%2AoCsBsPX1QtvQPSWKaBnrLQ.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F980%2F1%2AoCsBsPX1QtvQPSWKaBnrLQ.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you’ve adjusted the specs to match your needs, it’s simple to add the component wherever you need it in your app and use similar specs to achieve the intended appearance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F800%2F1%2ADTzw9Ci4Q2_aM_gWNzwtXw.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F800%2F1%2ADTzw9Ci4Q2_aM_gWNzwtXw.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Beyond Bootstrap
&lt;/h2&gt;

&lt;p&gt;Bootstrap pioneered the use of readymade user interfaces. People could pull interface elements off the shelf to rapidly build UIs. However, it required adherence to prescribed idioms and styles.&lt;/p&gt;

&lt;p&gt;Living styleguides allowed organizations to offer the same rapid development experience as Bootstrap with a custom look and feel. The challenge was that these styleguides required significant effort.&lt;/p&gt;

&lt;p&gt;A component library is a practical middle ground that enables rapid development and customization without needing much in the form of organizational momentum. Here at Chroma, we are big proponents of component libraries because they tend to guide teams into reuse and UI consistency without being authoritarian about it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/media/c066cf834200d80e25b62a6de730a4a6/href" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://medium.com/media/c066cf834200d80e25b62a6de730a4a6/href" rel="noopener noreferrer"&gt;https://medium.com/media/c066cf834200d80e25b62a6de730a4a6/href&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learn more about UI components:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://blog.hichroma.com/prefabricated-components-2932bfc992ba" rel="noopener noreferrer"&gt;Why you should build UI components in isolation Â»&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.hichroma.com/ui-component-playbook-fd3022d00590" rel="noopener noreferrer"&gt;5-step guide to creating modular frontends Â»&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;This post was originally published on &lt;a href="https://blog.hichroma.com/beyond-bootstrap-moving-from-ui-toolkit-to-component-library-f0a34f05e98b" rel="noopener noreferrer"&gt;blog.hichroma.com&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ui</category>
      <category>componentlibraries</category>
      <category>react</category>
      <category>frontend</category>
    </item>
  </channel>
</rss>
