Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!--
  Forked from:
  https://quasar.dev/vue-components/pagination#Example--Standard
-->
<div id="q-app">
      <q-layout view="lHh Lpr fff">
        <q-header class="glossy bg-primary">
          <q-toolbar>
            <q-toolbar-title shrink>
              QOverlay <span class="text-subtitle2">v{{ version }}</span>
            </q-toolbar-title>

            <q-space></q-space>

            <div>Quasar v{{ $q.version }}</div>
          </q-toolbar>
        </q-header>

        <q-page-container>
          <q-page>
            <div class="q-pa-md row items-start q-gutter-md">

              <!-- fullscreen overlay -->
              <q-overlay v-model="fullscreen" :no-scroll="noScroll" z-index="5000">
                <template v-slot:body>
                  <div class="fullscreen row justify-center items-center">
                    <q-spinner v-if="fullscreen && waiting" color="yellow" size="3em"></q-spinner>
                    <q-btn v-if="fullscreen && !waiting" color="primary" label="Exit" @click="fullscreen = !fullscreen"></q-btn>
                  </div>
                </template>
              </q-overlay>

              <!-- component overlay -->
              <q-overlay :no-scroll="noScroll" v-model="component">
                <template v-slot:body>
                  <div class="absolute fit row justify-center items-center">
                    <q-spinner v-if="component && waiting" color="yellow" size="3em"></q-spinner>
                    <q-btn v-if="component && !waiting" color="primary" label="Exit" @click="component = !component"></q-btn>
                  </div>
                </template>
                <q-card class="my-card bg-secondary text-white">
                  <q-card-section>
                    <div class="text-h5">QOverlay</div>
                    <div class="text-subtitle2">Put a standard overlay on full screen or over a component.</div>
                  </q-card-section>

                  <q-card-section>
                    <div class="text-h6">Fullscreen mode</div>
                    <div class="text-body2">For fullscreen overlay mode, the <i>q-overlay</i> tag can be placed anywhere in a template and should have no default slot used. The overlay will cover all scrollable area (try scrolling this page after entering Fullscreen mode). But, if the <strong>body</strong> slot is used, this will be available on the visible view port.</div>
                  </q-card-section>
                  <q-card-section>
                    <div class="text-h6">Component mode</div>
                    <div class="text-body2">For component overlay mode, the <i>q-overlay</i> tag is used to wrap a component. The overlay will cover the contained component.</div>
                  </q-card-section>

                  <q-separator dark></q-separator>
                  <q-checkbox v-model="noScroll" dark label="No scroll"></q-checkbox>
                  <q-separator dark></q-separator>

                  <q-card-actions>
                    <q-btn flat @click="fullscreen = !fullscreen">Fullscreen</q-btn>
                    <q-btn flat @click="component = !component">Component</q-btn>
                  </q-card-actions>
                </q-card>
              </q-overlay>
            </div>
          </q-page>
        </q-page-container>
      </q-layout>
</div>
              
            
!

CSS

              
                body
  min-height: 2000px
 
.my-card
  width: 100%
  max-width: 350px

              
            
!

JS

              
                new Vue({
  el: '#q-app',
  data () {
    return {
      date: '',
      version: QOverlay.version,
      fullscreen: false,
      component: false,
      waiting: false,
      timerId: null,
      noScroll: false
    }
  },
  beforeDestroy () {
    clearTimeout(this.timerId)
  },
  watch: {
    fullscreen (val) {
      clearTimeout(this.timerId)
      if (val) {
        this.waiting = true
        this.timerId = setTimeout(() => {
          this.waiting = false
        }, 2000)
      } else {
        this.waiting = false
      }
    },
    component (val) {
      clearTimeout(this.timerId)
      if (val) {
        this.waiting = true
        this.timerId = setTimeout(() => {
          this.waiting = false
        }, 2000)
      } else {
        this.waiting = false
      }
    }
  }
})
              
            
!
999px

Console