storybook-add-component

Create standardized Storybook stories for Vue components with autodocs and build validation.

22|23|Updated Aug 10, 2023
One-click install
npx skills add https://github.com/aziontech/azion-console-kit --skill storybook-add-component
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: storybook-add-component
Source: https://github.com/aziontech/azion-console-kit/tree/main/.claude/skills/storybook-add-component
Command: npx skills add https://github.com/aziontech/azion-console-kit --skill storybook-add-component

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a comprehensive blueprint for adding a new component to the Console Storybook, ensuring consistent documentation, patterns, and a build-ready setup across projects.

Core Features & Use Cases

  • Standardized story creation for Vue components under the Templates namespace.
  • Guidance on props, slots, and emits with autodocs-ready Storybook stories.
  • Support for dependency injection wrappers to handle runtime providers in isolation.
  • Step-by-step process from locating a component to validating a successful Storybook build.

Quick Start

Follow the steps to locate your component in src/templates, create a story file at storybook/src/stories/templates/{ComponentName}.stories.js using the provided patterns, and run yarn storybook:build to verify a successful build.

Frequently Asked Questions about storybook-add-component

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a Vue component to Storybook with complete documentation?

To add a Vue component to Storybook, create a story file in the stories/templates path using the @/templates/{component-path}/index.vue import, define default export tags as ['autodocs'], configure argTypes for props, and validate with yarn storybook:build.

What's the best way to document Vue component slots and emits in Storybook?

Documenting Vue slots and emits in Storybook requires defining comprehensive argTypes in the story file, demonstrating slot usage with multiple state variants, and adding the ['autodocs'] tag to the default export to generate reference documentation automatically.

Why does my Storybook build fail when adding a new Vue component story?

A Storybook build fails when Vue component stories use incorrect import paths. Ensure imports reference '@/templates/{component-path}/index.vue' exactly, and verify all props, slots, and emits are properly configured in argTypes before running yarn storybook:build.

Can I use dependency injection wrappers in Storybook stories for Vue components?

Yes, dependency injection wrappers can be used in Storybook stories to handle runtime providers in isolation. Wrap your Vue component stories with provider configurations to ensure components receive necessary dependencies during Storybook rendering and build validation.

Do I need to configure argTypes for all props when creating Storybook stories?

Yes, configuring argTypes for all props is required when creating Storybook stories. Comprehensive argTypes definitions ensure props, slots, and emits are documented correctly, enabling autodocs generation and guaranteeing a successful Storybook build validation.

What patterns should I follow for standardized Storybook story creation?

Standardized Storybook story creation follows patterns including placing stories in storybook/src/stories/templates/, using the Templates namespace, adding ['autodocs'] tags, demonstrating multiple state variants, and validating builds with yarn storybook:build for consistent documentation.