Component

Documentation

made easy

@ElevateBart
Discord, Twitter, Github

VueJs Chicago Meetup

Storybook

Vue-Styleguidist

Alligator

Dominic

💅 Designer 💅

Sarah

🛠 Design System Engineer 🛠

Phil

🚀 Final Product Developer 🚀

Oh! I don't have time for this either!

Automation !!

Tools of the trade

  1. Storybook + Live Coding
  2. Vue-Styleguidist + Live Coding

?

Storybook

vue add storybook

Button.stories.js


              import MyButton from "./MyButton.vue";
              import { action } from "@storybook/addon-actions";

              export default {
                component: MyButton,
                title: "Button"
              };

              export const withJSX = () => 
                <MyButton onClick={action("clicked")}>Click Me</MyButton>
            

Storybook

Cool !

  • Very Popular
  • Isolation
  • Slick Design
  • Knobs & other Addons
  • Backed by Chromatic QA

Not so cool

  • JSX is not HTML
  • ReactJs
  • Vue Dev Tools needs detach
🛠 🚀

Vue Styleguidist

vue add styleguidist

MyButton.vue


              <template>
                <button :style="`background-color:${color}`" >
<!-- @slot text of the button -->
<slot /> </button> </template> <script> export default { props: {
/** * Set the background color of the button * @values blue, red, green */
color: { type: String, default: "blue" } } } </script>

Vue Styleguidist

Cool !

  • Automated Props
  • Default Examples
  • Documentation in Code
  • Live Editor
  • Free Markdown pages
  • Theming

Not so cool

  • JSDoc is Verbose
  • position: fixed
  • Still in ReactJs

...Made Easy

Storybook Docs

  • Free Text Pages
  • Stories in MDX Files
  • Props and slots detection
  • Theming

vue-docgen-cli

This is the way

QR Code: Slides & Demo

Thank you

@ElevateBart
Discord, Twitter, Github