{"componentChunkName":"component---src-pages-get-started-develop-vue-mdx","path":"/get-started/develop/vue/","result":{"pageContext":{"isCreatedByStatefulCreatePages":true,"frontmatter":{"title":"Develop","description":"The Carbon Design System supports vanilla JS, React and Angular as core parts of the product. But you can still build components even if you're using a different framework.","tabs":["React","Vanilla","Angular","Vue","Other frameworks"]},"relativePagePath":"/get-started/develop/vue.mdx","titleType":"prepend","MdxNode":{"id":"c2808004-2dac-590e-a342-3e91a2db50b2","children":[],"parent":"93e8b5b0-97f1-57bf-9419-11a9dc03c867","internal":{"content":"---\ntitle: Develop\ndescription: The Carbon Design System supports vanilla JS, React and Angular as core parts of the product. But you can still build components even if you're using a different framework.\ntabs: ['React', 'Vanilla', 'Angular', 'Vue', 'Other frameworks']\n---\n\n<AnchorLinks>\n\n<AnchorLink>Carbon Vue library</AnchorLink>\n<AnchorLink>Getting started</AnchorLink>\n<AnchorLink>Troubleshooting</AnchorLink>\n\n</AnchorLinks>\n\n## Resources\n\n<Row>\n  <Column colMd={4} colLg={4} noGutterSm>\n    <ResourceCard\n      subTitle=\"Try Vue components with CodeSandbox.\"\n      href=\"https://codesandbox.io/s/5zk452o9jp\">\n      <MdxIcon name=\"codesandbox\" />\n    </ResourceCard>\n  </Column>\n</Row>\n\n## Carbon Vue library\n\nThe [library](http://vue.carbondesignsystem.com/) provides front-end developers & engineers a collection of reusable Vue components to build websites and user interfaces. Adopting the library enables developers to use consistent markup, styles, and behavior in prototype and production work.\n\n## Getting started\n\nAssuming we're starting with a new Vue CLI project:\n\n```sh\n$ vue create my-project\nVue CLI v3.5.2\n? Please pick a preset: default (babel, eslint)\n$ cd my-project\n```\n\nUsing Yarn\n\n```sh\n$ yarn add @carbon/vue\n```\n\nOr npm\n\n```sh\n$ npm install @carbon/vue\n```\n\nIn src/main.js add the following to include the carbon styles and components.\n\n```js\nimport 'carbon-components/css/carbon-components.css';\nimport CarbonComponentsVue from '@carbon/vue/src/index';\nVue.use(CarbonComponentsVue);\n```\n\nReplace the contents of src/components/HelloWorld.vue with the following\n\n```html\n<template>\n  <div class=\"sample\">\n    <h1>Example use of @carbon/vue</h1>\n    <cv-text-input\n      label=\"Who are you?\"\n      v-model=\"yourName\"\n      placeholder=\"your name\"\n    />\n    <cv-button @click=\"onClick\">Hello {{yourName}}</cv-button>\n    <cv-modal :visible=\"visible\" @modal-hidden=\"modalClosed\">\n      <template slot=\"title\"\n        >Welcome to @carbon/vue {{yourName}}</template\n      >\n      <template slot=\"content\">\n        <p>\n          Lorem ipsum dolor sit amet, consectetur adipisicing elit, seed do\n          eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad\n          minim veniam, quis nostrud exercitation ullamco laboris nisi ut\n          aliquip ex ea commodo consequat.\n        </p>\n      </template>\n    </cv-modal>\n  </div>\n</template>\n\n<script>\n  export default {\n    name: 'HelloWorld',\n    data() {\n      return {\n        yourName: '',\n        visible: false,\n      };\n    },\n    methods: {\n      onClick() {\n        this.visible = true;\n      },\n      modalClosed() {\n        this.visible = false;\n      },\n    },\n  };\n</script>\n\n<style>\n  .sample {\n    display: flex;\n    flex-direction: column;\n    justify-content: center;\n    align-items: center;\n    max-width: 600px;\n    margin: 5% auto;\n  }\n\n  .cv-text-input {\n    margin: 30px 0;\n  }\n</style>\n```\n\nThat's it! Now start the server and start building.\n\nUsing Yarn\n\n```sh\n$ yarn serve\n```\n\nOr npm\n\n```sh\n$ npm serve\n```\n\n_Note: This isn't the only way to bootstrap a_ `carbon-components-vue` _application, but the combination of_ `Vue CLI` _and the_ `carbon-components` _scss is our recommended setup._\n\n### List of available components\n\nView available Vue Components [here](http://vue.carbondesignsystem.com). Usage information is available in the notes provided with each story.\n\n## Troubleshooting\n\nIf you experience any issues while getting set up with Carbon Components Vue, please head over to the [GitHub repo](https://github.com/carbon-design-system/carbon-components-vue) for more guidelines and support. Please [create an issue](https://github.com/carbon-design-system/carbon-components-vue/issues) if your issue does not already exist.\n","type":"Mdx","contentDigest":"7e9d0af507f0a9e95a9a42976d5fa2ab","counter":1440,"owner":"gatsby-plugin-mdx"},"frontmatter":{"title":"Develop","description":"The Carbon Design System supports vanilla JS, React and Angular as core parts of the product. But you can still build components even if you're using a different framework.","tabs":["React","Vanilla","Angular","Vue","Other frameworks"]},"exports":{},"rawBody":"---\ntitle: Develop\ndescription: The Carbon Design System supports vanilla JS, React and Angular as core parts of the product. But you can still build components even if you're using a different framework.\ntabs: ['React', 'Vanilla', 'Angular', 'Vue', 'Other frameworks']\n---\n\n<AnchorLinks>\n\n<AnchorLink>Carbon Vue library</AnchorLink>\n<AnchorLink>Getting started</AnchorLink>\n<AnchorLink>Troubleshooting</AnchorLink>\n\n</AnchorLinks>\n\n## Resources\n\n<Row>\n  <Column colMd={4} colLg={4} noGutterSm>\n    <ResourceCard\n      subTitle=\"Try Vue components with CodeSandbox.\"\n      href=\"https://codesandbox.io/s/5zk452o9jp\">\n      <MdxIcon name=\"codesandbox\" />\n    </ResourceCard>\n  </Column>\n</Row>\n\n## Carbon Vue library\n\nThe [library](http://vue.carbondesignsystem.com/) provides front-end developers & engineers a collection of reusable Vue components to build websites and user interfaces. Adopting the library enables developers to use consistent markup, styles, and behavior in prototype and production work.\n\n## Getting started\n\nAssuming we're starting with a new Vue CLI project:\n\n```sh\n$ vue create my-project\nVue CLI v3.5.2\n? Please pick a preset: default (babel, eslint)\n$ cd my-project\n```\n\nUsing Yarn\n\n```sh\n$ yarn add @carbon/vue\n```\n\nOr npm\n\n```sh\n$ npm install @carbon/vue\n```\n\nIn src/main.js add the following to include the carbon styles and components.\n\n```js\nimport 'carbon-components/css/carbon-components.css';\nimport CarbonComponentsVue from '@carbon/vue/src/index';\nVue.use(CarbonComponentsVue);\n```\n\nReplace the contents of src/components/HelloWorld.vue with the following\n\n```html\n<template>\n  <div class=\"sample\">\n    <h1>Example use of @carbon/vue</h1>\n    <cv-text-input\n      label=\"Who are you?\"\n      v-model=\"yourName\"\n      placeholder=\"your name\"\n    />\n    <cv-button @click=\"onClick\">Hello {{yourName}}</cv-button>\n    <cv-modal :visible=\"visible\" @modal-hidden=\"modalClosed\">\n      <template slot=\"title\"\n        >Welcome to @carbon/vue {{yourName}}</template\n      >\n      <template slot=\"content\">\n        <p>\n          Lorem ipsum dolor sit amet, consectetur adipisicing elit, seed do\n          eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad\n          minim veniam, quis nostrud exercitation ullamco laboris nisi ut\n          aliquip ex ea commodo consequat.\n        </p>\n      </template>\n    </cv-modal>\n  </div>\n</template>\n\n<script>\n  export default {\n    name: 'HelloWorld',\n    data() {\n      return {\n        yourName: '',\n        visible: false,\n      };\n    },\n    methods: {\n      onClick() {\n        this.visible = true;\n      },\n      modalClosed() {\n        this.visible = false;\n      },\n    },\n  };\n</script>\n\n<style>\n  .sample {\n    display: flex;\n    flex-direction: column;\n    justify-content: center;\n    align-items: center;\n    max-width: 600px;\n    margin: 5% auto;\n  }\n\n  .cv-text-input {\n    margin: 30px 0;\n  }\n</style>\n```\n\nThat's it! Now start the server and start building.\n\nUsing Yarn\n\n```sh\n$ yarn serve\n```\n\nOr npm\n\n```sh\n$ npm serve\n```\n\n_Note: This isn't the only way to bootstrap a_ `carbon-components-vue` _application, but the combination of_ `Vue CLI` _and the_ `carbon-components` _scss is our recommended setup._\n\n### List of available components\n\nView available Vue Components [here](http://vue.carbondesignsystem.com). Usage information is available in the notes provided with each story.\n\n## Troubleshooting\n\nIf you experience any issues while getting set up with Carbon Components Vue, please head over to the [GitHub repo](https://github.com/carbon-design-system/carbon-components-vue) for more guidelines and support. Please [create an issue](https://github.com/carbon-design-system/carbon-components-vue/issues) if your issue does not already exist.\n","fileAbsolutePath":"/zeit/3ed0734e/src/pages/get-started/develop/vue.mdx"}}}}