Storybook for Vue

Storybook 3.2 for Vue demo, featuring vue-charts, actions/notes/knobs addons.

Vue is one of the fastest-growing web frameworks, loved for its simplicity, ease of use, and performance. To spread the Storybook love, Norbert de Langen and Alexandre Bodin joined forces with Vue core team member kazuya kawaguchi to add Storybook Vue support in 3.2.

Getting started with Storybook in a Vue project is easy as pie:

npm i -g @storybook/cli

cd my-vue-project

getstorybook

npm run storybook

Storybook’s architecture is largely framework agnostic, so even newly-added frameworks like Vue benefit from Storybook’s rich addon ecosystem.

Read more about Vue support in the Storybook-Vue announcement.

Story Hierarchy

Using Story Hierarchy to organize the Rebass Functional React UI Library in Storybook 3.2

If you’re working with complex UIs, the new Story Hierarchy feature by Igor Davydkin is your dream come true.

One of Storybook’s key features is the ability to organize all of the component states of your application or library (aka “stories”) into a single catalog:

storiesOf('Component1')

.add('story1', () => <Component {...props1} />)

.add('story2', () => <Component {...props2} />)

As the number of components grow, it becomes increasingly difficult to manage the list. Therefore, one of the most-requested Storybook features was the ability to group stories hierarchically.

With a small change of syntax (the / character by default, user-configurable) you can now create hierarchically nested groups of stories:

storiesOf('path/to/Component', module)

.add('story1', () => <Component {...props1} />)

.add('story2', () => <Component {...props2} />)

You can see Story Hierarchy in action in the animation at the top of this section. It’s a simple and powerful change, and is completely backwards compatible with previous versions of storybook.

Story Hierarchy is Igor’s first OSS contribution. Read more about it in Igor’s post and pat him on the back by giving his story a heart!

React Native On-Device UI

Browse React Native stories, e.g. react-native-elements shown here, on your device in Storybook 3.2.

Finally, the 3.2 release brings on-device story navigation UI for your React Native projects by Matt Oakes, Richard Evans, and me. Now you no longer have to switch between stories using your web browser and can do it directly within your native app on the device.

Enabling on-device UI is simple. Just set onDeviceUI in @storybook/react-native ‘s getStorybookUI :

const StorybookUI = getStorybookUI({ ..., onDeviceUI: true });

Storybook’s React Native support continues to improve so stay tuned for more great RN features coming soon in 3.3.

… and one more thing!

Browse React Native stories directly in your VSCode

Not part of the Storybook release, but if you use VSCode to develop React Native, check out this slick setup from orta to navigate stories directly in your IDE. It’s free on the VSCode store.

Onwards and Upwards

225+ Storybook contributors from every corner of the globe. Come join us!

As the first community-driven release of Storybook, 3.0 was a major overhaul of the organization and code structure. Storybook 3.2 demonstrates the fruits of those labors.

Many 3.2 features came from new contributors, some of whom are completely new to OSS. We’re striving to create a friendly community where it’s easy to plug in, and this release proves it’s working. Come join us to change the way modern UI’s are engineered.

These awesome github users contributed code to the 3.2 release:

Get it Now

Try out Storybook 3.2 today. If you’re already using Storybook, it takes just a minute to upgrade. And if you’re not, get started with the best way to develop React, React Native, and Vue component UI’s:

npm i -g @storybook/cli

cd my-vue-react-or-rn-project

getstorybook

npm run storybook

If you have questions, problems, encouragements, or simply exclamations of joy for the new release, please give us a holler on Twitter, Slack, Github, or in the comments below!

Finally, to stay up to date with Storybook-related news, hit “follow” below, or check us out on Twitter. And if you love Storybook, please tap the 💚 button below to help more people discover it.

With ❤️, storybook team.