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.


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">
<!--  component ;is=で動的にコンポーネントを変えることができる  -->
  <component :is="selected">
    <!--  ボタンをクリックしたら、コンポーネントについての値、selectedを変更する
          単にjsとして処理されている。この中は -->
    <button @click="selected ='appBlack'">黒</button>
    <button @click="selected ='appWhite'">白</button>
    <!--   メインのコンポーネントにあるlabelの値を使っている   -->
    <h2 class="label" v-bind:class="fontColor"> {{ label }} </h2>
    <button @click="fontColor ='red'">赤</button>
    <button @click="fontColor ='green'">緑</button>
    <!--   バインドされている方は、コンポーネントが変わっても残る   -->
    <input v-model="label" /> バインドされてる
    <input/> バインドされてない

<!-- 黒のボトルのテンプレート -->
<script type="text/x-template" id="black">
  <div class="black">

<!-- 白のボトルのテンプレート -->
<script type="text/x-template" id="white">
  <div class="white">


  color: blue

  width: 100px
  background-color: black
  width: 100px
  background-color: white
  border: solid 1px black
  color: red
  color: green


                const app = new Vue({
  el: '#app',
  data: function() {
    return {
      selected: 'appBlack',
      label: "basic",
      fontColor: "red"
  components: {
    'appBlack': {
      template: '#black'
    'appWhite': {
      template: '#white'