Security News
JavaScript Leaders Demand Oracle Release the JavaScript Trademark
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
@storybook/vue
Advanced tools
@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.
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',
};
Vue Styleguidist is a tool for creating style guides for Vue components. It focuses on documenting components and their usage, similar to Storybook, but with a stronger emphasis on style guide generation.
Docz is a documentation tool that supports multiple frameworks, including Vue. It allows developers to create interactive documentation for their components, similar to Storybook, but with a broader focus on documentation rather than just component development.
Vue Play is a minimalistic library for developing Vue components in isolation. It provides a simpler and more lightweight alternative to Storybook, focusing on the core functionality of component isolation and testing.
FAQs
Storybook Vue renderer
The npm package @storybook/vue receives a total of 88,045 weekly downloads. As such, @storybook/vue popularity was classified as popular.
We found that @storybook/vue demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
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.
Security News
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.