Socket
Socket
Sign inDemoInstall

@storybook/vue

Package Overview
Dependencies
314
Maintainers
8
Versions
1507
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @storybook/vue

Storybook Vue renderer


Version published
Weekly downloads
115K
decreased by-6.86%
Maintainers
8
Install size
30.5 MB
Created
Weekly downloads
 

Package description

What is @storybook/vue?

@storybook/vue is a tool for developing UI components in isolation for Vue.js applications. It allows developers to build, test, and document components independently, which can improve the development workflow and ensure components are well-tested and documented.

What are @storybook/vue's main functionalities?

Component Development

Allows developers to create and display different states of Vue components in isolation. This helps in visualizing and testing components independently.

import { storiesOf } from '@storybook/vue';
import MyButton from './MyButton.vue';

storiesOf('MyButton', module)
  .add('default', () => ({
    components: { MyButton },
    template: '<my-button>Default</my-button>'
  }))
  .add('with emoji', () => ({
    components: { MyButton },
    template: '<my-button>😀 😎 👍 💯</my-button>'
  }));

Addons

Supports various addons to enhance the development experience, such as knobs for dynamic prop editing, actions for event handling, and more.

import { withKnobs, text } from '@storybook/addon-knobs';
import MyButton from './MyButton.vue';

export default {
  title: 'MyButton',
  decorators: [withKnobs],
};

export const withText = () => ({
  components: { MyButton },
  props: {
    buttonText: {
      default: text('Button Text', 'Hello Storybook'),
    },
  },
  template: '<my-button :text="buttonText" />',
});

Documentation

Enables the creation of interactive documentation for components, making it easier for other developers to understand and use them.

import { Meta, Story } from '@storybook/vue';
import MyButton from './MyButton.vue';

export default {
  title: 'MyButton',
  component: MyButton,
} as Meta;

const Template: Story = (args, { argTypes }) => ({
  props: Object.keys(argTypes),
  components: { MyButton },
  template: '<my-button v-bind="$props" />',
});

export const Primary = Template.bind({});
Primary.args = {
  primary: true,
  label: 'Button',
};

Other packages similar to @storybook/vue

Changelog

Source

7.6.17

  • Addon-docs: Fix Table of Contents heading leak - #23677, thanks @vmizg!
  • Core: Update ip version to fix CVE-2023-42282 - #26086, thanks @drik98!

Readme

Source

Storybook Vue renderer

Keywords

FAQs

Last updated on 20 Feb 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc