Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <div id="v-tabs">
  <h1 class="pen-heading">Vertical Vue.js Tabs</h1>
  <div class="container">
    <div class="row">
      <div class="col-md-6">
          <div v-for="tab in tabs" @click="selectedTab = tab.title" :class="{ active : selectedTab == tab.title }" class="tab-item">
            <h3 class="tab-item__heading">{{ tab.title }}</h3>
            <p class="tab-item__subheading">{{ tab.subtitle }}</p>
          </div>
      </div>
      <div class="col-md-6">
        <template v-if="selectedTab == 'Credit Application'">
          <h3 class="tab-content__header">Process applicants faster</h3>
          <p class="tab-content__text">Eliminate paper shuffling and data entry by sending applicants to a branded online credit application in seconds.</p>
          <a href="" class="tab-content__btn">Learn about the online credit application</a>
          <p class="tab-content__testimonial">
            "This service is incredible. The information is current and user-friendly. What a gem in the credit world!"
          </p>
          <p class="tab-content__testimonial-author">
            Penny Everest, Valiant Products Corporation
          </p>
          <img class="tab-content__testimonial-img" src="http://18.216.223.98/wp-content/uploads/2017/12/Valiant-Products.png">
        </template>
        <template v-if="selectedTab == 'Decision Assistant'">
          <h3 class="tab-content__header">Approve more applicants</h3>
          <p class="tab-content__text">Process more applications by automatically filtering which applicants are easy approvals and which need more attention.</p>
          <a href="" class="tab-content__btn">Learn about the Decision Assistant</a>
          <p class="tab-content__testimonial">
            "This service is incredible. The information is current and user-friendly. What a gem in the credit world!"
          </p>
          <p class="tab-content__testimonial-author">
            Penny Everest, Valiant Products Corporation
          </p>
          <img class="tab-content__testimonial-img" src="http://18.216.223.98/wp-content/uploads/2017/12/Valiant-Products.png">
        </template>
        <template v-if="selectedTab == 'Lifetime Monitoring'">
          <h3 class="tab-content__header">Stay up-to-date with customers</h3>
          <p class="tab-content__text">Process more applications by automatically filtering which applicants are easy approvals and which need more attention.</p>
          <a href="" class="tab-content__btn">Learn about Lifetime Monitoring</a>
          <p class="tab-content__testimonial">
            "This service is incredible. The information is current and user-friendly. What a gem in the credit world!"
          </p>
          <p class="tab-content__testimonial-author">
            Penny Everest, Valiant Products Corporation
          </p>
          <img class="tab-content__testimonial-img" src="http://18.216.223.98/wp-content/uploads/2017/12/Valiant-Products.png">
        </template>
        <template v-if="selectedTab == 'Data Reporting'">
          <h3 class="tab-content__header">Get customers to pay on time</h3>
          <p class="tab-content__text">Process more applications by automatically filtering which applicants are easy approvals and which need more attention.</p>
          <a href="" class="tab-content__btn">Learn about Data Reporting</a>
          <p class="tab-content__testimonial">
            "This service is incredible. The information is current and user-friendly. What a gem in the credit world!"
          </p>
          <p class="tab-content__testimonial-author">
            Penny Everest, Valiant Products Corporation
          </p>
          <img class="tab-content__testimonial-img" src="http://18.216.223.98/wp-content/uploads/2017/12/Valiant-Products.png">
        </template>
      </div>
    </div>
  </div>
</div>
              
            
!

CSS

              
                body {
  font-family: 'Roboto', sans-serif;
  padding: 50px;
  background: #fcfcfc;
  height: 100vh;
}

.pen-heading {
  font-weight: bold;
  font-size: 4em;
  text-align: center;
  margin-bottom: 40px;
  color: ##333;
}

.tab-item {
  background: white;
  border: 1px #D5DADF solid;
  border-left: 5px solid #D5DADF;
  box-shadow: 0 2px 3px rgba(213,218,223,0.35);
  padding: 30px;
  border-radius: 3px;
  cursor: pointer;
  transition: all .2s ease;
  margin-bottom: 15px;
}

.tab-item:hover, .tab-item.active {
  box-shadow: 0px 3px 3px 2px rgba(213,218,223,0.35);
  border-left: 5px solid #28AB26;
}

.tab-item__heading {
  font-weight: bold;
  font-size: 36px;
  line-height: 1.3em;
  letter-spacing: 0.02em;
  color: #314f8d;
  margin: 0px;
}

.tab-item__subheading {
  font-size: 18px;
  color: #333;
  margin: 0px;
}

.tab-content__header {
  color: #314f8d;
  font-weight: bold;
   margin: 0px 0px 30px;
  font-size: 36px;
  line-height: 1.3em;
  letter-spacing: 0.02em;
}

.tab-content__text {
  margin: 0px 0px 30px;
  font-size: 1.25em;
}

.tab-content__btn {
  display: inline-block;
  margin-bottom: 30px;
  padding: 16px 50px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  text-transform: uppercase;
  font-weight: 900;
  position: relative;
  transition: all .3s ease;
  text-align: center;
  line-height: 1;
  border: 2px solid;
  border-radius: 3px;
  background-color: transparent;
  box-shadow: 0 2px 3px rgba(213,218,223,0.35);
  color: #24a926;
  fill: #24a926;
  border-color: #24a926;
}

.tab-content__btn:hover {
  color: #24a926;
  text-decoration: none;
  box-shadow: 0px 3px 3px 2px rgba(213,218,223,0.35);
}

.tab-content__testimonial {
  margin-bottom: 15px;
  font-size: 1em;
  color: rgba(0,0,0,.75);
  font-style: italic;
}

.tab-content__testimonial-author {
  margin-bottom: 5px;
  font-size: 1em;
  color: rgba(0,0,0,.75);
  font-weight: bold;
}


              
            
!

JS

              
                var vtabs = new Vue({
  el: '#v-tabs',
  data: {
    tabs: [
      {
        title: "Credit Application",
        subtitle: "Process applicants faster"
      },
      {
        title: "Decision Assistant",
        subtitle: "Approve more applicants"
      },
      {
        title: "Lifetime Monitoring",
        subtitle: "Stay up-to-date with customers"
      },
      {
        title: "Data Reporting",
        subtitle: "Get customers to pay on time"
      }
    ],
    selectedTab: "Credit Application"
  },
  methods: {
    selectTab() {
      this.selectedTab = this.tab.title;
    }
  }
});
              
            
!
999px

Console