Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

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


Auto Save

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-pa-md">
    <div class="q-gutter-y-md">
      <div class="row no-wrap" style="height: 90vh; max-width: 600px;">
        <div class="col">
          <div id="pageTabWrapper" class="column full-height" style=" border: 2px solid green;">
            <q-tabs v-model="tab" dense class="text-grey" active-color="primary" indicator-color="primary" align="justify" narrow-indicator >
              <q-tab name="tableTab" label="Table Tab"></q-tab>
              <q-tab name="textTab" label="Text Tab"></q-tab>

            <q-tab-panels v-model="tab" class="col full-width q-px-md">

              <q-tab-panel name="tableTab" style="border:2px dashed blue;" class="row">
                  With no fixed height, the height of the container is determined by the table height.

                  The question is: how to use flex so the table pagination 
                  footer is sticky to the bottom of the tab panel and the 
                  table rows scroll?
                  To put it another way: how to ensure the red dots always fit inside the blue dashes?-->
                <div id="tableContainer" class="col" style="border: 2px dotted red;" >

                <!-- eg by comparison: 
                    with a FIXED HEIGHT the table scrolls its rows within this container height.
                <div id="tableContainer" class="col" style="border: 2px solid red; height: 400px;" > -->                  

              <!-- Text Tab. Just to show that the tab setup can scroll a simple text example -->
              <q-tab-panel name="textTab" style="border:2px dashed blue; "  class="row q-pa-xs">
                <q-scroll-area visible class="col">
                  <div class="text-h6">Text:</div>
                  <div v-for="n in 20" :key="n" class="q-py-xs" style="background-color: #ddd;">
                    {{ n }} Lorem ipsum dolor sit amet, consectetur adipisicing
                    elit, sed do eiusmod tempor incididunt ut labore et
                    dolore magna aliqua.





                new Vue({
  el: '#q-app',
  data () {
    return {
      tab: 'tableTab',

      // For a table
      initialPagination: {
        sortBy: 'desc',
        descending: false,
        page: 1,
        rowsPerPage: 10
      columns: [
          name: 'name',
          required: true,
          label: 'Dessert (100g serving)',
          align: 'left',
          field: row =>,
          format: val => `${val}`,
          sortable: true
        { name: 'calories', align: 'center', label: 'Calories', field: 'calories', sortable: true },
        { name: 'fat', label: 'Fat (g)', field: 'fat', sortable: true },
        { name: 'carbs', label: 'Carbs (g)', field: 'carbs' }
      data: [
        { name: 'Frozen Yogurt', calories: 159, fat: 6.0, carbs: 24, protein: 4.0, sodium: 87, calcium: '14%', iron: '1%' },
        { name: 'Ice cream sandwich', calories: 237, fat: 9.0, carbs: 37, protein: 4.3, sodium: 129, calcium: '8%', iron: '1%' },
        { name: 'Eclair', calories: 262, fat: 16.0, carbs: 23, protein: 6.0, sodium: 337, calcium: '6%', iron: '7%' },
        { name: 'Cupcake', calories: 305, fat: 3.7, carbs: 67, protein: 4.3, sodium: 413, calcium: '3%', iron: '8%' },
        { name: 'Gingerbread', calories: 356, fat: 16.0, carbs: 49, protein: 3.9, sodium: 327, calcium: '7%', iron: '16%' },
        { name: 'Jelly bean', calories: 375, fat: 0.0, carbs: 94, protein: 0.0, sodium: 50, calcium: '0%', iron: '0%' },
        { name: 'Lollipop', calories: 392, fat: 0.2, carbs: 98, protein: 0, sodium: 38, calcium: '0%', iron: '2%' },
        { name: 'Honeycomb', calories: 408, fat: 3.2, carbs: 87, protein: 6.5, sodium: 562, calcium: '0%', iron: '45%' },
        { name: 'Donut', calories: 452, fat: 25.0, carbs: 51, protein: 4.9, sodium: 326, calcium: '2%', iron: '22%' },
        { name: 'KitKat', calories: 518, fat: 26.0, carbs: 65, protein: 7, sodium: 54, calcium: '12%', iron: '6%' }