

Digging into UI in this abstract way takes all the chaos of this madcap world away one breakpoint at a time, and in that quiet realm, you are good down to the pixel every time. Since we are talking about how all these fabulous tools work so well together to help you be productive, can I just say what a delight it is to work on UI with Zeplin or Figma side by side with Storybook. That is fine for buttons or UI with borders, but it’s hard to tell precisely where your component starts and ends, so I hacked them in there.

One other hack you’ll notice is that I added a pair of divs to bookend my component vertically, since Storybook renders with whitespace around the component. getSectionsFromJourney() just filters the sections. This file is entirely generated from Yeoman (discussed below), and it delivers the examples from the Alps Journey by default. This is the crux of the matter for Storybook. Beyond that, if you have alternative states you want to account for, perhaps loading or error states, you can add them in manually. If your mock data really covers all the various various possible states for your UI, you are good to go. The only tricks I apply to Storybook are loading the stories with the mock data we’ve extracted from the API. You get fast hot module reloading and a couple checkboxes to enable/disable browser features like Flexbox. It is the perfect place to make sure your work aligns with designs to the pixel across breakpoints. The tool we use for editing UI is React Storybook.
