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">
  <div class="container">
    <h1>Input examples <small>Vue.js</small> </h1>  
    <form v-on:submit.prevent="submitForm">
      <!-- text input -->
      <div class="form-group">
        <label for="username" class="form-label">Username:</label> (input:text)
        <input type="text" class="form-control" id="formData.username" v-model="formData.username" />            
      <div class="text-right"><span class="badge badge-info">field value: "{{ formData.username }}"</span></div>

      <!-- password input -->
      <div class="form-group">
        <label for="password" class="form-label">Password:</label> (input:password)
        <input type="password" class="form-control" id="password" v-model="formData.password" />            
      <div class="text-right"><span class="badge badge-info">field value: "{{ formData.password }}"</span></div>

      <!-- radio -->
      <div class="form-group">
        <label class="form-label">Gender:</label> (radio)
        <div v-for="g in genders">
          <input type="radio" v-model="formData.gender" :value="g.value" />                      
          <label class="custom-control-label" for="customRadio1"> {{ g.label }}</label>                   
      <div class="text-right"><span class="badge badge-info">field value: "{{ formData.gender }}"</span></div>

      <!-- checkbox -->
      <div class="form-group">
        <label class="form-label">Interests:</label> (checkbox)
        <div v-for="i in setOfInterests">
          <input type="checkbox" v-model="formData.interests" :value="i.value" />                      
          <label class="custom-control-label" for="customRadio1"> {{ i.label }}</label>                   
      <div class="text-right"><span class="badge badge-info">field value: "{{ formData.interests }}"</span></div>

      <!-- select -->
      <div class="form-group">
        <label class="form-label">Favourite IDE:</label> (input:select)    
        <select v-model="formData.favouriteIDE" class="form-control">
          <option v-for="ide in setOfIDEs" :value="ide.value">{{ ide.label }}</option>        
      <div class="text-right"><span class="badge badge-info">field value: "{{ formData.favouriteIDE }}"</span></div>

      <!-- multiple select -->
      <div class="form-group">
        <label class="form-label">Software you are using</label> (input:multi-select)    
        <select v-model="formData.softwares" class="form-control" multiple>
          <option v-for="ide in setOfSoftwares" :value="ide.value">{{ ide.label }}</option>        
      <div class="text-right"><span class="badge badge-info">field value: "{{ formData.softwares }}"</span></div>

      <!-- textarea -->    
      <div class="form-group">
        <label for="aboutYou" class="form-label">About You:</label> (textarea)
        <textarea type="text" class="form-control" id="aboutYou" v-model="formData.aboutYou"></textarea>
      <div class="text-right"><span class="badge badge-info">field value: "{{ formData.aboutYou }}"</span></div>

      <!-- button -->
      <label for="subscribe" class="form-label">Subscribe newsletter:</label> (Button)<br />
      <button type="button" id="subscribe" :class="{btn: true, 'btn-primary': formData.subscribe, 'btn-default': !formData.subscribe}" @click="formData.subscribe=!formData.subscribe">
        {{ formData.subscribe?'Yes':'No' }}
      <div class="text-right"><span class="badge badge-info">field value: "{{ formData.subscribe }}"</span></div>
      <!-- submit -->
      <div class="form-group">
        <label for="send" class="form-label">Submit form:</label> (input:submit)<br />
        <input type="submit" id="send" value="Send" class="form-control btn btn-primary"/>
      <div class="text-right"><span class="badge badge-info badge-multiline">form data: "{{ JSON.stringify(formData) }}"</span></div>
<div class="container-fluid footer text-center">    
  <p>A teljes cikket elolvashatod az ITHub-on. Klikkelj a logóra alább!</p>
  <p><em>You can read the Hungarian full article on the ITHub. Click the logo below!</em></p>
  <a href="" target="ithub">
    <img src="" alt="ithub logo" style="width: 85px; height: auto;">    


                h1 {
  color: #4fc08d;

h1 small {
  color: darkgray;

.form-label {
  font-weight: bold; 
  text-align: right;

.badge.badge-info {
  background-color: #4fc08d;
  font-size: 1.1em;
  font-weight: normal;    

hr {
  margin-top: 5px;
  margin-bottom: 10px;
  border-color: #4fc08d;
  border-style: dashed;

.btn.btn-primary {
    background-color: #4fc08d;

.badge-multiline {
  word-wrap: break-word;
  text-align: left;
  width: 40%;

/** footer ***/

.container-fluid {  
  width: 100%;
  margin: 10px 0;
  clear: both;   

.footer {
  background-color: #1B1C1D;
  padding: 10px 10px;;
  color: white;
  font-size: 20px;
  font-family: arial;
  text-height: 40px;
  em {
    color: #aaa;  
  a {
    display: inline-block;
    border: 1px solid #aaa;
    border-radius: 10px;
    padding: 10px;    
    color: #ddd;
    text-decoration: none;    


                new Vue({
  el: '#app',
  data: {
    formData: {
      username: 'John',
      password: 'Wick',
      gender: 'male',  
      interests: ['cola', 'coffee'],
      favouriteIDE: 'sublime',
      softwares: ['win10', 'phpstorm', 'sublime'],
      aboutYou: "",   
      subscribe: true
    genders: [
      {value: '-', label: 'not set'},
      {value: 'M', label: 'male'},
      {value: 'F', label: 'femaile'},
    setOfInterests: [      
      {value: 'pizza', label: 'Pizza'},
      {value: 'cola', label: 'Cola'},
      {value: 'chips', label: 'Chips'},
      {value: 'cup of Tea', label: 'Cup of Tea'},
      {value: 'coffee', label: 'Coffee'},
    setOfIDEs : [
      {value: 'codepen', label: ''},
      {value: 'webstorm', label: 'WebStorm'},
      {value: 'phpstorm', label: 'PHPStorm'},
      {value: 'sublime', label: 'Sublime Text'},
      {value: 'notepadpp', label: 'NotePad++'},
    setOfSoftwares : [
      {value: 'win10', label: 'Microsoft Windows 10'},
      {value: 'debian', label: 'Debian Linux'},
      {value: 'phpstorm', label: 'PHPStorm'},
      {value: 'sublime', label: 'Sublime Text'},
      {value: 'ubuntu', label: 'Ubuntu Linux'},
  methods: {
    submitForm: function() {
      alert('Submit button is clicked.')