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="app" class="h-screen flex items-center justify-center text-black antialiased">
  <div class="w-full max-w-sm border rounded border-gray-400 px-8 pt-6 pb-4">
    <div class="text-2xl font-bold">Todo App</div>
    <div class="text-gray-700">Don’t forget the important</div>
    <div class="mt-3">
      <!-- item 1 -->
      <div class="flex items-center">
        <div>
          <span v-if="!isFirstDone" @click="isFirstDone = true" class="ion-ios-radio-button-off text-2xl text-gray-500 leading-tight"></span>
          <span v-if="isFirstDone" @click="isFirstDone = false" class="ion-ios-checkmark-circle text-2xl text-teal-400 leading-tight"></span>
        </div>
        <div class="ml-2 flex-1">
          <input class="w-full" type="text" v-model="firstTask" :class="{'line-through text-gray-500': isFirstDone}" placeholder="Enter new task">
        </div>
      </div>
      <!-- item 2 -->
      <div class="flex items-center">
        <div>
          <span v-if="!isSecondDone" @click="isSecondDone = true" class="ion-ios-radio-button-off text-2xl text-gray-500 leading-tight"></span>
          <span v-if="isSecondDone" @click="isSecondDone = false" class="ion-ios-checkmark-circle text-2xl text-teal-400 leading-tight"></span>
        </div>
        <div class="ml-2 flex-1">
          <input type="text" v-model="secondTask" :class="{'line-through text-gray-500': isSecondDone}" placeholder="Enter new task">
        </div>
      </div>
      <!-- item 3 -->
      <div class="flex items-center">
        <div>
          <span v-if="!isThirdDone" @click="isThirdDone = true" class="ion-ios-radio-button-off text-2xl text-gray-500 leading-tight"></span>
          <span v-if="isThirdDone" @click="isThirdDone = false" class="ion-ios-checkmark-circle text-2xl text-teal-400 leading-tight"></span>
        </div>
        <div class="ml-2 flex-1">
          <input type="text" v-model="thirdTask" :class="{'line-through text-gray-500': isThirdDone}" placeholder="Enter new task">
        </div>
      </div>
      <!-- item 4 -->
      <div class="flex items-center">
        <div>
          <span v-if="!isFourthDone" @click="isFourthDone = true" class="ion-ios-radio-button-off text-2xl text-gray-500 leading-tight"></span>
          <span v-if="isFourthDone" @click="isFourthDone = false" class="ion-ios-checkmark-circle text-2xl text-teal-400 leading-tight"></span>
        </div>
        <div class="ml-2 flex-1">
          <input type="text" v-model="fourthTask" :class="{'line-through text-gray-500': isFourthDone}" placeholder="Enter new task">
        </div>
      </div>
    </div>
  </div>
</div>
              
            
!

CSS

              
                input, textarea, button:focus {
  outline: none;
}

input::placeholder {
  color: #cbd5e0;
  opacity: 1;
}
              
            
!

JS

              
                var app = new Vue({
  el: '#app',
  data: {
    isFirstDone: true,
    isSecondDone: false,
    isThirdDone: false,
    isFourthDone: false,
    firstTask: 'Pick up delivery',
    secondTask: 'Buy granola',
    thirdTask: 'Call grandma',
    fourthTask: '',
  },
  methods: {
    // functions go here
  }
})
              
            
!
999px

Console