Neptune's Potato Monsters

    vue-basic-modal

    0.3.0 • Public • Published

    Vue Basic Modal

    A basic modal made with vove, I mean with luve... VUE and LOVE!

    Demo on jsbin

    Usage

    1. Install
    npm install vue-basic-modal

    or using UMD

    <script src="https://unpkg.com/vue-basic-modal/dist/vue-basic-modal.umd.min.js"></script>
    1. Add the css file somewhere in your application
    <link rel="stylsheet" href="https://unpkg.com/vue-basic-modal/dist/basic-modal.css"></link>
    1. And finally the component!
    <template>
      <div>
        <button type="button" @click="state = !state">Show Modal</button>
        <basic-modal :state="state">
          I am a Modal
        </basic-modal>
      </div>
    </template>
     
    <script>
    import basicModal from 'vue-basic-modal';
     
    export default {
      name: 'my-comp',
      data: () => {
        return {
          state: true,
        };
      },
      components: {
        basicModal: basicModal,
        // basicModal: window['basic-modal'], if you are using UMD version
      },
    };
    </script> 

    Build component

    npm run component

    Install

    npm i vue-basic-modal

    DownloadsWeekly Downloads

    52

    Version

    0.3.0

    License

    MIT

    Unpacked Size

    78.3 kB

    Total Files

    24

    Last publish

    Collaborators

    • erivero