cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation


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.

              <div id="app">
  <!--The Different Properties that we will be dealing with while using buttons are as follows:-
1. btnText - Contains Button Text
2. size - Size of the Button
3. type - Various Style Types eg primary, danger, success etc.
4. outline - outline buttons with outline class eg primary, danger,success etc
5. active - It is Boolean and Determines whether the button is Active or not
5. block - It is a Boolean and makes the button block level element.

  <div class="container">
    <h3>Simple Binded Buttons</h3>
    <vue-button btn-text="Primary" type="primary"></vue-button>
    <vue-button btn-text="Secondary" type="secondary"></vue-button>
    <vue-button btn-text="Success" type="success"></vue-button>
    <vue-button btn-text="Info" type="info"></vue-button>
    <vue-button btn-text="Warning" type="warning"></vue-button>
    <vue-button btn-text="Danger" type="danger"></vue-button>
    <vue-button btn-text="Link" type="link"></vue-button>
    <h3>Bi-Directional Binding for Buttons</h3>
    <vue-button :btn-text="buttonLabel" :type="buttonType"></vue-button>
    <h3>Other Properties for a Button</h3>
    <vue-button :btn-text="bigButton.label" :type="bigButton.type" :size="bigButton.size" :active="bigButton.active" :block="bigButton.block"></vue-button>
              // Simple Vue Button Component
Vue.component("vue-button", {
  props: ["btnText", "size", "type", "outline", "active", "block"],
  template: `<button type="button" class="btn" :class='[computedType,computedOutline,computedSize,computedActive,computeBlock]'>{{btnText}}</button>
  computed: {
    computedType: function() {
      return "btn-" + this.type;
    computedOutline: function() {
      return "btn-outline-" + this.outline;
    computedSize: function() {
      return "btn-" + this.size;
    computedActive: function() {
      return this.active === "true" ? "active" : "";
    computeBlock: function() {
      return this.block === "true" ? "btn-block" : "";

new Vue({
  el: "#app",
  data: {
    buttonLabel: "Login",
      label:"Big Button Label",

Loading ..................