Building digital products and empowering online companies
Vue Live Demo used on Indielayer
DEMO - https://indielayer.github.io/vue-live-demo/
Do you want to add to your own projects? There you go:
- Add this package to your dependencies
$ npm i @indielayer/vue-live-demo
# or
$ yarn add @indielayer/vue-live-demo
- Usage:
<template>
<div style="padding-top: 100px">
<vue-live-demo
:code="code"
:show-code="showCode"
:components="components"
/>
</div>
</template>
<script>
import VueLiveDemo from '@indielayer/vue-live-demo'
// Components you wish to add on the demo
// import RandomComponent from './RandomComponent.vue'
export default {
components: {
VueLiveDemo
},
data() {
return {
// components you wish to add on the demo
components: {
// RandomComponent,
},
code: `<template><div>hello</div></template>`,
showCode: true
}
}
}
</script>
import
other scripts in the Single File Component
MIT license - Indielayer