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">
  <input type="text" value="{{stock}}">
  <input type="text" v-bind:value="stock" />
   <!-- 클래스 이름에 - 가 있다면 '' 로 감싸야한다-->
  <p v-bind:class="{'active-on':isActive}">text</p>
  <p v-bind:style="{backgroundColor: textColor}">text</p>
  <p>수량 : {{stock > 0 ? stock : '없음'}}</p>

  <video v-bind:src="videoItem.src"
  <video v-bind="videoItem"></video>
    <circle v-bind="svgData"/>
  <input type="range" min="0" max="100" v-model="svgData.r">

  <p v-if="visible">v-if text</p>  <!-- 렌더링 x, 컴포넌트에 데이터가 없어 오류가 날것같을때 사용 -->
  <p v-show="visible">v-show text</p>  <!-- display: none, 데이터는 있지만 눈에 보이지 않게 하려면 사용 -->
  <!-- 여러조건의 태그에 v-if를 사용하고싶으면 template 태그로 그룹핑하여 사용 (v-show는 안됨) -->
  <template v-if="visible">
      <span>test text</span>
  <div v-if="ifType == 1">
    <input type="text" v-bind:value="ifType" key="1"/>
  <div v-else-if="ifType == 2">
    <input type="text" v-bind:value="ifType" key="2"/>
  <div v-else="ifType == 3">
    <input type="text" v-bind:value="ifType" key="3"/>



  outline: 1px solid #ddd;
  display: inline-block;
  background: #010101;
  display: block;
  outline: 1px solid #ddd;


                const data = {
  visible : false,
  ifType : 2,
  stock : 5,
  scroll: 0,
  isActive : true,
  textColor : '#ddd',
  videoItem : {
    src : '#',
    width : 100,
    height: 50,
    autoplay : 'autoplay'
  svgData : {
    fill : 'green',
    cx : 150,
    cy : 75,
    r : 10

const app = new Vue({
  el : '#app',
  data : data