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="app">
  <task-list :tasks="tasks"></task-list>

<template id="task-list">
    <section class="tasks">
        <transition name="fade">
          <small v-if="incomplete">({{ incomplete }})</small>
      <div class="tasks__new input-group">
        <input type="text"
               placeholder="New task"
        <span class="input-group-button">
          <button @click="addTask" 
            <i class="fa fa-plus"></i> Add

      <div class="tasks__clear button-group pull-right">
        <button class="button warning small"
          <i class="fa fa-check"></i> Clear Completed
        <button class="button alert small"
          <i class="fa fa-trash"></i> Clear All
      <transition-group name="fade" tag="ul" class="tasks__list no-bullet">
          <task-item v-for="(task, index) in tasks"

<template id="task-item">
    <li class="tasks__item">
      <button :class="className"
        {{ task.title }}
      <button class="tasks__item__remove button alert pull-right"
        <i class="fa fa-times"></i>


  background-color #abc

*, h1, button
  font-family: 'Nunito', sans-serif;
.fade-enter-active, .fade-leave-active
  transition: opacity .5s

.fade-enter, .fade-leave-active
  opacity: 0

  width 100%
  max-width 45rem
  padding 1em
  margin 1em auto
  overflow auto
  background-color white
  box-shadow 0px .25rem 1rem rgba(black, .25)

  clear both

  margin-bottom .5em
  position relative

  cursor pointer
  width 100%
  text-align left
  padding .85em 2.25em .85em 1em
  background-color rgba(black, .05)
  border 1px solid rgba(black, .1)

  background-color rgba(black, .1)
  border-color rgba(black, .15)

  text-decoration line-through
  background-color rgba(green, .15)
  border-color rgba(green, .2)

  background-color rgba(green, .25)
  border-color rgba(green, .3)

  position absolute
  height 100%
  top 50%
  right 0
  transform translateY(-50%)
.tasks__item__remove i
  vertical-align middle


                Vue.component('task-list', {
  template: '#task-list',
  props: {
    tasks: {default: []}
  data() {
    return {
      newTask: ''
  computed: {
    incomplete() {
      return this.tasks.filter(this.inProgress).length;
  methods: {
    addTask() {
      if (this.newTask) {
          title: this.newTask,
          completed: false
        this.newTask = '';
    completeTask(task) {
      task.completed = ! task.completed;
    removeTask(index) {
      this.tasks.splice(index, 1);
    clearCompleted() {
      this.tasks = this.tasks.filter(this.inProgress);
    clearAll() {
      this.tasks = [];
    inProgress(task) {
      return ! this.isCompleted(task);
    isCompleted(task) {
      return task.completed;

Vue.component('task-item', {
  template: '#task-item',
  props: ['task'],
  computed: {
    className() {
      let classes = ['tasks__item__toggle'];
      if (this.task.completed) {
      return classes.join(' ');

new Vue({
  el: '#app',
  data: {
    tasks: [
        title: 'Make todo list',
        completed: true
        title: 'Go skydiving',
        completed: false