DEV Community

reoring
reoring

Posted on

8

Use Storybook with Vuejs

Screen Shot 2017-08-21 at 17.08.26.png

Storybook Since 3.2, support for Vuejs has been added, so I will try using it at once.

Storybook is a tool that makes it easy to create catalogs of components, cataloging self-made components in the project and how to use it.

Screen Shot 2017-08-21 at 16.54.49.png

Installation of storybook / cli

npm i - g @ storybook / cli
Enter fullscreen mode Exit fullscreen mode

Prepared by existing Vuejs project

cd Directory where vuejs project is located
Enter fullscreen mode Exit fullscreen mode

Installing the storybook

getstorybook
Enter fullscreen mode Exit fullscreen mode

Start storybook server

yarn run storybook
Enter fullscreen mode Exit fullscreen mode

In this state, opening http://localhost:6006/ opens the default setting screen.

Add component

To add a component to a storybook, add a definition to index.js in thestories directory created with getstorybook.

You can change this stories directory by editing.storybook / config.js.

Reference material

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

đź‘‹ Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay