@storybook-vue/vue3-vite
TypeScript icon, indicating that this package has built-in type declarations

7.4.0-alpha.2 • Public • Published

Storybook for Vue 3 and Vite

Storybook for Vue 3 is a UI development environment for your Vue 3 components. With it, you can visualize different states of your UI components and develop them interactively.

Storybook Screenshot

Storybook runs outside of your app. So you can develop UI components in isolation without worrying about app specific dependencies and requirements.

Getting Started

cd my-vue3-app
npx storybook@latest init

For more information visit: storybook.js.org


Storybook also comes with a lot of addons and a great API to customize as you wish. You can also build a static version of your Storybook and deploy it anywhere you want.

Extending the Vue application

Storybook creates a Vue 3 application for your component preview. When using global custom components (app.component), directives (app.directive), extensions (app.use), or other application methods, you will need to configure those in the ./storybook/preview.js file.

Therefore, Storybook provides you with a setup function exported from this package, which receives as a callback your Storybook instance, which you can interact with and add your custom configuration.

// .storybook/preview.js

import { setup } from '@storybook/vue3';

setup((app) => {
  app.use(MyPlugin);
  app.component('my-component', MyComponent);
  app.mixin({
    /* My mixin */
  });
});

Readme

Keywords

Package Sidebar

Install

npm i @storybook-vue/vue3-vite

Weekly Downloads

57

Version

7.4.0-alpha.2

License

MIT

Unpacked Size

13.5 kB

Total Files

9

Last publish

Collaborators

  • javachakir-npm