Pen Settings



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


Babel includes JSX processing.

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


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


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.


                <div id="q-app">
  <div class="q-ma-md">
  <div class="q-ma-md">
    $q.fullscreen.isActive = {{$q.fullscreen.isActive}}<br>
    isfullscreen = {{isfullscreen}}<br>
    isactivefullscreenelement = {{isactivefullscreenelement}} <q-btn color="primary" @click="checkIsInFullScreenElement()" icon="help">check if there is full screen element</q-btn><br>
    iskeyboardlocked = {{iskeyboardlocked}}<br>
<q-toggle v-model="preventdefault" label="prevent default keyboard events (press Esc longer in full screen to exit)"></q-toggle><br>
    <q-btn color="primary" @click="$q.fullscreen.toggle()" :icon="$q.fullscreen.isActive ? 'fullscreen_exit' : 'fullscreen'">toggle fullscreen</q-btn>

  <div class="q-ma-md">
    Running Quasar v{{ Quasar.version }}




                new Vue({
  el: '#q-app',
  data: function () {
    return {
      isfullscreen: false,
      isactivefullscreenelement: false,
      iskeyboardlocked: false,
      preventdefault: false
  mounted () {
    document.addEventListener('fullscreenchange', this.onFullScreenChange)
    document.addEventListener('mozfullscreenchange', this.onFullScreenChange)
    document.addEventListener('MSFullscreenChange', this.onFullScreenChange)
    document.addEventListener('webkitfullscreenchange', this.onFullScreenChange)
  beforedestroy () {
    document.removeEventListener('fullscreenchange', this.onFullScreenChange)
    document.removeEventListener('mozfullscreenchange', this.onFullScreenChange)
    document.removeEventListener('MSFullscreenChange', this.onFullScreenChange)
    document.removeEventListener('webkitfullscreenchange', this.onFullScreenChange)
  methods: {
    onFullScreenChange (event) {
      console.log('onFullScreenChange:', event)
      this.isfullscreen = !this.isfullscreen
    checkIsInFullScreenElement () {
      this.isactivefullscreenelement = !!(document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement)
    onGlobalHotKeyDown (event) {
      if (this.preventdefault) {
      let msg = `key: ${event.key}, code: ${event.code}, ctrlKey: ${event.ctrlKey}, shiftKey: ${event.shiftKey}, altKey: ${event.altKey}, metaKey: ${event.metaKey}, charCode: ${event.charCode}, keyCode: ${event.keyCode}`
      this.$q.notify({message: msg, group:false})
      if (event.code === 'KeyN' && event.ctrlKey) {
        this.$q.notify({message:'Ctrl+N', color:'positive', group:false})
      if (event.code === 'Tab' && event.ctrlKey) {
        this.$q.notify({message:'Ctrl+Tab', color:'positive', group:false})
  watch: {
    '$q.fullscreen.isActive': function (val) {
      console.log('fullscreen.isActive', val)
      if (val) {
        if (navigator.keyboard && navigator.keyboard.lock) {
          this.iskeyboardlocked = true
          document.addEventListener('keydown', this.onGlobalHotKeyDown, true)
      } else {
        document.removeEventListener('keydown', this.onGlobalHotKeyDown, true)
        this.iskeyboardlocked = false