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 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

Packages

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.

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

              
                <div id="q-app">
  <q-layout view="lHh LpR fff">
    <q-toolbar>
      <q-btn @click="drawer = !drawer" icon="menu" round dense flat></q-btn>
      <q-toolbar-title class="title">
        <q-btn color="primary" icon="info" label="Quasar" @click="notify" class="q-ma-md"></q-btn>
        <span slot="subtitle">Testing new layout features with Quasar v0.15.0-BETA.11
        </span>
      </q-toolbar-title>
    </q-toolbar>
    <q-tabs class="navigation" align="center" position="top" no-pane-border>
      <q-route-tab to="/user/foo">Intro</q-route-tab>
      <q-route-tab to="/user/foo/profile">profile</q-route-tab>
      <q-route-tab to="/user/foo/posts">posts</q-route-tab>
    </q-tabs>
    <router-view></router-view>
    <q-layout-drawer v-model="drawer" overlay behavior="desktop" content-class="row">
      <div class="col-6 column bg-blue">
        <q-card id="search"class=" bg-grey">
          <q-item>
            <q-item-side><q-icon icon="search" class="q-ma-md" /></q-item-side>
            <q-item-main>
              <q-field>
                <q-input type="email" icon="mail" value="" float-label="search" v-model="search" clearable />
              </q-field>
            </q-item-main>
          </q-item>
        </q-card>
        <q-scroll-area class="col">
          <template v-for="n in 50">{{n}}<br></template>
        </q-scroll-area>
        <div class="col-auto bg-green">
          footer
        </div>
      </div>
      <q-scroll-area class="col-6 column">
        <div class="col-auto bg-red">
          header
        </div>
        <div class="col">
          <template v-for="n in 30">{{n}}<br></template>
        </div>
        <div class="col-auto bg-green">
          footer
        </div>
      </q-scroll-area>
    </q-layout-drawer>
  </q-layout>

</div>
              
            
!

CSS

              
                @import url(http://weloveiconfonts.com/api/?family=fontawesome);

/* fontawesome */
[class*="fontawesome-"]:before {
  font-family: 'FontAwesome', sans-serif;
}
.wrapper {
  display: flex;  
  flex-flow: row wrap;
  font-weight: bold;
  text-align: center;
  width: 50%;
  height: 100%;
}

.wrapper > * {
  padding: 0px;
  flex: 1 100%;
}

.header {
  background: tomato;
}

.footer {
  background: lightgreen;
  height: 95px;
}

.main {
  text-align: left;
  background: deepskyblue;
}

.aside-1 {
  background: gold;
  width: 50%;
  height: 90%;
}

.aside-2 {
  background: hotpink;
  width: 50%;
  height: 90%;
}

@media all and (min-width: 600px) {
  .aside { flex: 1; }
}

@media all and (min-width: 800px) {
  .main    { flex: 3 0px; }
  .aside-1 { order: 1; } 
  .main    { order: 2; }
  .aside-2 { order: 3; }
  .footer  { order: 4; }
}
              
            
!

JS

              
                const User = {
  template: `
    <div class="user">
      <h5>User {{ $route.params.id }}</h5>
      <!-- These routes are children of "user" -->
      <router-view></router-view>
    </div>
  `
}
const UserHome = {
  template: `
    <q-page-container>
      <q-page>
        <div class="q-ma-md">
           <q-card>
             <q-card-title class="bg-primary text-white">
               Welcome!
             </q-card-title>
             <q-card-main class="q-mt-sm">
               This is just a small sample of what quasar can do. 
               <br>
               There are <em>many</em> more components and options, and this fiddle does not showcase the tooling at all.
               <br>
               <br>
               Quasar can easily be deployed from a single codebase as an SPA, PWA, Cordova, or Electron application, all with just a few cli commands. SSR is coming soon!
               <br>
               <br>
               Getting started with Quasar v0.15 beta:
               <br>
               <br>
               
               <div class="bg-grey-4 q-pa-sm">
                 <code>
                   $ npm install -g quasar-cli@next
                   <br>
                   <br>
                   $ quasar init
                 </code>
               </div>            
             </q-card-main>
          </q-card>            
        </div>
      </q-page>       
    </q-page-container>` }
const UserProfile = { template: '<div>Profile</div>' }
const UserPosts = { template: '<div>Posts</div>' }
const Error404 = { template: '<div>Error: 404</div>' }
const router = new VueRouter({
  routes: [
    { path: '/user/:id', component: User,
      children: [
        // UserHome will be rendered inside User's <router-view>
        // when /user/:id is matched
        { path: '', component: UserHome },
				
        // UserProfile will be rendered inside User's <router-view>
        // when /user/:id/profile is matched
        { path: 'profile', component: UserProfile },

        // UserPosts will be rendered inside User's <router-view>
        // when /user/:id/posts is matched
        { path: 'posts', component: UserPosts },
        // when a route is not matched
        { path: '*', component: Error404 }
      ]
    },
    // when a route is not matched
    { path: '*', component: Error404 }
  ]
})

new Vue({
  el: '#q-app',
  router,
  data: ()=> ({
    search: '',
    modal: false,
    drawer: false,
    setting: false,
    selected: [ 1, 4 ],
    items: [
      {
        label: 'Item 1',
        sublabel: 'Still item 1',
        value: 1
      },
      {
        label: 'Item 2',
        sublabel: 'Still item 2',
        value: 2
      },
      {
        label: 'Item 3',
        sublabel: 'Still item 3',
        value: 3
      },
      {
        label: 'Item 4',
        sublabel: 'Still item 4',
        value: 4
      }
    ],
    version: Quasar.version
  }),
  methods: {
  	notify() {
      this.$q.notify('Running on Quasar v' + this.$q.version + '. Fork and make your own!')
    }
	}
})
              
            
!
999px

Console