1.1.2 • Published 3 years ago

vue-codesandbox v1.1.2

Weekly downloads
20
License
-
Repository
-
Last release
3 years ago

vue-codesandbox

vue-codesandbox lets you embed your codesandbox code on to your vue application

Package setup

install vue-codesandbox by running the following command

npm i vue-codesandbox

Usage

In your component, after intalling the package, import it as follows

import vuecodesandbox from "vue-codesandbox";

Then include the component in your export

export default {
  name: "App",
  components: {
    vuecodesandbox,
  },
};

Once done, you can now use the component in your templete section with the required props passed in as such

<vuecodesandbox 
codeUrl="https://codesandbox.io/s/vue-vue?autoresize=1&fontsize=14&hidenavigation=1&theme=dark" 
width="1000" 
height="1000"
/>
<template>
  <div id="app">
    <vue-codesandbox
      codeUrl="https://codesandbox.io/s/vue-vue?autoresize=1&fontsize=14&hidenavigation=1&theme=dark"
      width="1000"
      height="1000"
    />
  </div>
</template>

props

  • codeUrl(required) : Type(String) - This is the link to your codesandbox code you want to embed, you just pass it as prop
  • width(required) : Type(Number) - This is the width your codesandbox will occupy
  • height(required) : Type(Number) - This is the height your codesandbox will occupy
1.1.2

3 years ago

1.1.1

3 years ago

1.0.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago