A simple and free Vue.js component for fullscreen.

vue fullscreen

Demo

http://mirari.cc/vue-fullscreen/

Installation

Install from GitHub via NPM

npm install vue-fullscreen

Usage

To use vue-fullscreen, simply import it, and call Vue.use() to install.

<template>
  <div id="app">
    <fullscreen :fullscreen.sync="fullscreen">
      Content
    </fullscreen>
    <button type="button" @click="toggle" >Fullscreen</button>
  </div>
</template>
<script>
  import fullscreen from 'vue-fullscreen'
  import Vue from 'vue'
  Vue.use(fullscreen)
  export default {
    methods: {
      toggle () {
        this.fullscreen = !this.fullscreen
      }
    },
    data() {
      return {
        fullscreen: false
      }
    }
  }
</script>