9

Revamping Storybook’s addon ecosystem

 3 years ago
source link: https://storybook.js.org/blog/revamping-storybooks-addon-ecosystem/?ref=sidebar
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Revamping Storybook’s addon ecosystem

Addon Catalog beta with updated documentation

Dominic Nguyen
Dec 15, 2020 — @domyen

Storybook has over 200 addons that enable new features and integrations. Similar to VSCode extensions, addons are a convenient way to customize Storybook to fit your UI development workflow.

The addon ecosystem is one of the main reasons why teams adopt Storybook. But until now, finding the right addon for your use case involved plunging the depths of NPM.  I’m excited to highlight Storybook’s best addons in the new addon catalog (beta).

VtkdSiK2MEVYUjwMrgpaMpGISjUH1u8nA0cBxGMxAILslLvJ0P6ABCpzsgWsRcrHJ_sy3vfHHN4WcZha0HWjs6O2gpfIQ6S2eRGefj-kQ1suq_FDfhBXtGrwFKffJpmJhL3Q6ZFT
Live beta of addon catalog

Who uses addons and why?

Storybook’s addon API is one of its core innovations. Not only does it allow users to extend and configure Storybook in countless ways, but many of these addons are automatically cross-framework (i.e. usable in React, Vue, Angular, etc.) without modifications. This means, if you write an addon for your React project, you can reuse it in over 60,000 public Storybooks.

“Storybook is a well documented platform, letting us build an Addon that unlocks value to our users in a short period of time.”
– Brendan Mahony at Contrast YC18

Thanks to the addon APIs versatility, the number of addons has skyrocketed. To understand what’s possible, let’s take a look at who uses addons and why.

Large organizations

Addons simplify sharing integrations with different Storybooks. Large companies use them to integrate company-specific libraries and promote UI hygiene.

Intuit centralizes UI component design and development documentation with addons. Every UI developer has a standardized template for component documentation and the theme support.

iF3oasa-9EgkCPQLQYYrNgWbLdo9p0bghsf2lUhcrMiCmvJL5MAwo43BtwrKqCxsHei3AiUBUTgTl-vSgvDmwMOouc3yx24wWF6koAx1Nf4cjUFE-_5xDWITVF8ApWkApAHQfE6m

Naver, the #1 search engine in South Korea, created an addon to preview component code in multiple frameworks. That makes it easy to browse a component’s documentation for React, Vue, or Angular.

AeF1Ux1gA4LRXk2fiHFP25gABCnjueu12pTyrmaOFP-fcwV65Ix4LTBE_eLwwwuTQX-wgLxYXXuSMRHWfr7bReR_T_JHMcetfXjihNkpSS0djfSXjEM_5lIMgY6x7OuLsPGv0xFr

Leading agencies

Addons streamline the UI development handoff for agencies. With a constant stream of new projects, speeding up build outs results in happier clients and higher margins.

Whitespace’s HTML addon renders a component’s HTML output in an addon panel. Even though it replicates what developers already do with browser devtools, the small convenience results in big time savings in the long run.

“We often work for tech companies with inhouse backend devs. Getting direct access to HTML without having to set up the project saves time.” –Fredrik, tech lead at Whitespace

Animated preview of the addon in action

Etch takes developer productivity to the next level. Their addons integrate Storybook with Bugherd and add component status labels.

storybook-bugherd.png
storybook-status.png
Left: Storybook Bugherd, Right: Component status

Software companies

Addons help companies tame the countless states in modern UIs. Developers at these companies have to deal with the combinatorial explosion of stories and screen sizes. They build addons to stress test a component’s edge cases.

EatWith, the self-proclaimed AirBnb of food, created an addon that previews components in multiple viewport widths simultaneously. That ensures their UI looks great on every screen.

nh1jUjndxncYq8mHe4x8_1BzdPJEAXiorLfVqb7pbl4baQZ5gPiUqzmGVhGM8a-4o4IVH-qpwBlkc6iEulXTmWM8_jPmzFRj1vDrX8veViDpNtsEn3jLb8rT0BKo_7N-2oORUCdK

Splice, a sound catalog for audio engineers and musicians, made the preview-branch addon which helps engineers swap between feature-branches fast. If you’ve ever wondered “what does that component look like on master?”, this addon is for you.

mymTbJnZpKs1rzVN5wH7Kor-R7TwTVixih0t1Wb6mzscoScuTtz7_VKkbixiPLIryCeASDFGMTxhe9IGwDyxuiQDRwtIILKGCZ3TZ_eJE18yfjRtgYgk7T6sUhVf2rasWHEHIQMi

Solo developers and nimble teams

Storybook does the heavy-lifting for addon authors. Typically, it takes a few hours to write an addon; even faster if you follow our guides and docs. This allows folks to quickly integrate with their favorite tools and prototype new workflows.

Shota Fuji initially created the Figma addon as a side project to speed up his agency. This year it ballooned to 320k+ monthly downloads and inspired addons for AdobeXD, Abstract, and Zeplin.

ZuocBsjlSgHkdATeKq8OHTyzDfqVtxs256wcUP3i1453dHE8fqhV-GB4vQnLk8Gh7feDHRccU5bWy7p_B9je74Yz6ga43RcsFEmuFR2s18MDmFMRErg4FxxlXhXYZEDGGqKhiEpw

Meanwhile, Alex Holachek launched Storybook Mobile, an addon that helps developers build mobile web UIs by showing contextual hints. It’s the first linter for mobile web UIs.

“Mobile-web browsers account for about 50% of website visits, yet many mobile web best practices are frequently overlooked.”

8Y-CQJUNt16xZE57vIai8zS5_SWQWRInEGWfVunh4v1ievpYBPCLQ7nL_xGx_pgmHeege7EiaRVkAp19_yjbNS5ifByxRfYTNzfgBlvTkpIDuetJ9VKqVUnA2arWSuMKLgGXC4oJ

Contrast (YC18) shipped a design handoff workflow that highlights the difference between code and Figma design--“a spell checker for your UI.” Developers can reference layout, spacing, fonts, and colors without leaving Storybook.

4pU9MTyhJ0fGofzmxduWG7j2-_MCjZY04eUi9t7hjE0fDae43lbtnd880IkUQUBeiDZjAee5dlZAoN5AJQa6xUxXVAOyKoS-ck7kj_hWszeA6XLUwG8iDvbZjovtUVENjYv5cLnH

Paul Scanlon built MDX Embed, an addon for embedding rich media like Codepen, Egghead, and GitHub into your design system or component documentation.

7EyC9MDCSNsDzfyu1mqZCw01HBumtEcxIXHtjA5MW2Mn_dcJi4fB-1VaZ6etrNpP2hMcbbXgqoT1CIqgrovV65e5KiBDfV3sxVKT3BQ1-nGF-Gw9g5YLrdhxskUUv-izkIJ5JAMZ

How to write an addon

We surveyed developers from Shopify, Algolia, and Godaddy to understand how they use addons. The main barrier to building addons is lack of documentation. That was a straightforward fix: we overhauled the addon docs and learning materials.

📖 New addon documentation breaks down everything you need to write an addon. It covers the API, project setup, and use cases.

🗺 “How to build a Storybook addon” is an upcoming tutorial that provides a step-by-step instructions on building an addon. Read the first chapter now.


Get notified when the catalog launches

Thousands of teams use addons to customize Storybook. Maintainers Dominic Nguyen (me!), Varun Vachhar, João Cardoso, and Michael Shilman are revamping the addon ecosystem so the community can share addons. That means every Storybook user can ship more UIs with less work.

Browse the addon catalog beta now. Get notified when it launches by signing up to the Storybook mailing list below.

Are you building an addon? I’d love to learn how we can help you. Direct message me (@domyen) in Storybook’s Discord.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK