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 is required to process package imports. If you need a different preprocessor remove all packages first.

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


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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.


                <div id="background"></div>

<script src=""></script>

<div id="vue">
  <div v-html="html"></div>
  <button v-on:click="sayHello">Try me</button>


                @import url('');

body {
  margin: 0;
  position: absolute;
  height: 700px;
  width: 100%;
  font-family: ubuntu;

#background {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url( repeat;
  background-color: #095396;


#vue {
  margin: auto;
  margin-top: 128px;
  width: 300px;
  height: 326px;
  padding: 54px 36px 112px;
  background-color: whitesmoke;
  text-align: center;
  border: 1px solid white;
  border-radius: 16px;
  box-shadow: 0 4px 64px white;

#vue h1 {
  text-shadow: 0 1px 6px cyan;

#vue p#darkblue {
  margin-top: 42px;
  margin-bottom: 24px;
  text-shadow: 0 0 60px darkblue;

#vue #bar {
  margin-top: 38px;
  margin-bottom: 40px;
  height: 1px;
  background-color: black

#vue label {
  display: block;
  margin-bottom: 32px;
  font-weight: bold;
  text-align: center

#vue input {
  width: 200px;
  padding: 4px;
  border: 2px solid darkblue;
  border-radius: 8px;

#vue button {
  cursor: pointer;


                //the following two blocks of code are components
//we'll use them to make custom html elements

Vue.component("hello", {
  template: "<label>Input Your Name:<h1></h1><input/></label>"

Vue.component("bar", {
  template: "<div id='bar'></div>"

//next we'll select an element
//set up data
//and define a method

new Vue({
  el: "#vue",
  data: {
    text: "Simple Vue App.",
    html: "<p id='darkblue'>You can use Vue to do<br/>all kinds of cool stuff!</p>"
  methods: {
    sayHello: function() {
      var name = document.querySelector("#vue input"),
        button = document.querySelector("#vue button"),
        prompt = "What's your name?";
      var style =;

      if (!name.value || name.value === prompt) {
        name.value = prompt;
      } else {
        alert("Howdy " + name.value + "!");
        name.value = null;