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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

            
              <script type="text/x-template" id="page">
<div>
  <h1 class="border-bottom padding-bottom-10px margin-bottom-20px">Radio Set</h1>
  <div class="main-illo-container ">
    <img class="main-illo" src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/14179/-build-assets-illustrations-sm-illo-sm-employees-3.svg'>
  </div>
  <h3 class="text-center margin-top-20px margin-bottom-0px lh-9">What would you like to see in the future?</h3>
  <p class="c-salt-700 text-center margin-bottom-40px">Please select one.</p>

  <div class="row">
    <div class='col-sm-12'>
      <div class="row">
        <div class="col-sm-12 col-md-4">
          <binarycard id='option-1'></binarycard>
        </div>
        <div class="col-sm-12 col-md-4">
          <binarycard-2></binarycard-2>
        </div>
        <div class="col-sm-12 col-md-4">
          <binarycard-3></binarycard-3>
        </div>
      </div>
    </div>
  </div>
    <div class='btn-group'>
        <button class="btn btn-primary">Save & Continue</button>
        </div>
</div>
</script>

<!-- Import app -->
[[[https://codepen.io/robinrendle/pen/8393f1ca785288804f68f99b11df5197]]]
            
          
!

CSS

            
              .binary {
  box-shadow: 0px 2px 7px 3px #eaeaea;
  cursor: pointer;
  border-radius: 4px;
  outline: none;
  margin-bottom: 20px;
  backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform-style: preserve-3d;
  transition: all .2s ease;
}

.binary-label {
  background-color: white;
  cursor: pointer;
  border-radius: none;
  padding: 30px;
  margin: 0;
}

.binary-text {
  font-weight: 400;
  color: #9c9da3;
}

.binary-heading {
  display: block;
  text-align: center;
}

.binary-footer {
  display: flex;
  padding: 15px;
  background-color: #f3f3f4;
  border-radius: 0 0 4px 4px;
  align-items: center;
  border: 2px solid transparent;
}

h3 {
  line-height: 1.4 !important;
}

.binary-input {
  display: none;
}

.binary:before {
  content: '';
  z-index: -1;
  position: absolute;
  top: -2px;
  left: -2px;
  bottom: -2px;
  right: -2px;
  border-radius: 4px;
  border: 2px solid transparent;
  background-color: transparent;
  transition: all .3s ease;
}

.binary:hover:before {
  border: 2px solid #bbb;
  background-color: #bbb;
}

.selected:before {
  display: block;
  content: 'Select';
  
  .binary:focus & {
    content: 'Selected';
    color: darken(#60e1da, 30);
  }
}

.binary:focus {
  background-color: white;
  position: relative;
  
  &:before {
    background-color: #66e1d9;
    border: 2px solid #66e1d9;
  }
  
  .binary-footer {
    transition: all .3s ease;
    background-color: #d4f7f0;
  }
  svg {
    animation: .3s enlarge forwards;
    .circle {
      stroke: #FFFFFF;
      fill: #25D6C9;
    }
    .tick {
      opacity: 1;
    }
  }
}

@keyframes enlarge {
  0%, 100% {
    transform: scale(1);
  } 50% {
    transform: scale(1.3);
  }
}

.binary-footer {
  display: flex;
}

.binary {
  svg {
    width: 25px;
    height: 25px;
    .circle {
      stroke: #a5a6ac;
      fill: white;
    }
    .tick {
      opacity: 0;
    }
  }
}

.main-illo {
  max-width: 50px;
  margin: 0 auto;
  display: block;
  padding: 0;
}

.main-illo-container {
  align-items: flex-start;
  justify-content: center;
  height: 40px;
  margin-top: 40px;
}

.btn-group {
  display: flex;
  justify-content: center;
}


            
          
!

JS

            
              const Page = {
  template: '#page'
};


Vue.component('binarycard', {
  template: `
    <div class="binary binary-active" tabindex="0">
      <label for="item-1" class="binary-label">
        <h4 class="binary-heading">Time & Attendance</h4>
        <div class="binary-text">
          <p>Deserunt illum officiis quae mollitia, ea dolorum, incidunt sed ab culpa tempora expedita</p>
        </div>
      </label>
      <div class="binary-footer">
        <input name="process" class="binary-input" type="radio" id="item-1" checked>
<svg viewBox="0 0 32 32" width="32" height="32">
    <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <g id="Group" transform="translate(1.000000, 1.000000)">
            <circle class="circle" id="Oval-2-Copy" stroke="#FFFFFF" stroke-width="2" fill="#25D6C9" cx="15" cy="15" r="15"></circle>
            <path class="tick" d="M20.0747692,7.52428966 L13.4768525,19.2462557 L9.78532063,15.7550564 C9.39532649,15.3318808 8.74224106,15.310722 8.32645366,15.7127389 C7.91066625,16.1041764 7.88899991,16.7812574 8.27899406,17.2044331 L12.996066,21.6689364 C13.3850285,22.0921121 14.0381139,22.1132708 14.4539013,21.711254 C14.5797724,21.5948807 21.8617265,8.58222884 21.8617265,8.58222884 C22.1464841,8.08499742 21.9772803,7.42907514 21.4841131,7.14343156 C20.9899142,6.84720859 20.3595269,7.02705825 20.0747692,7.52428966 Z" id="Path-Copy" fill="#FFFFFF"></path>
        </g>
    </g>
</svg>
<div class="selected padding-left-10px c-salt-600"></div>
      </div>
    </div>
  `
});

Vue.component('binarycard-2', {
  template: `
    <div class="binary binary-inactive" tabindex="0">
      <label for="item-2" class="binary-label">
        <h4 class="binary-heading">Loan Program</h4>
        <div class="binary-text">
          <p>Deserunt illum officiis quae mollitia, ea dolorum, incidunt sed ab culpa tempora expedita</p>
        </div>
      </label>
      <div class="binary-footer">
        <input name="process" class="binary-input" type="radio" id="item-2">
<svg viewBox="0 0 32 32" width="32" height="32">
    <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <g id="Group" transform="translate(1.000000, 1.000000)">
            <circle class="circle" id="Oval-2-Copy" stroke="#FFFFFF" stroke-width="2" fill="#25D6C9" cx="15" cy="15" r="15"></circle>
            <path class="tick" d="M20.0747692,7.52428966 L13.4768525,19.2462557 L9.78532063,15.7550564 C9.39532649,15.3318808 8.74224106,15.310722 8.32645366,15.7127389 C7.91066625,16.1041764 7.88899991,16.7812574 8.27899406,17.2044331 L12.996066,21.6689364 C13.3850285,22.0921121 14.0381139,22.1132708 14.4539013,21.711254 C14.5797724,21.5948807 21.8617265,8.58222884 21.8617265,8.58222884 C22.1464841,8.08499742 21.9772803,7.42907514 21.4841131,7.14343156 C20.9899142,6.84720859 20.3595269,7.02705825 20.0747692,7.52428966 Z" id="Path-Copy" fill="#FFFFFF"></path>
        </g>
    </g>
</svg>
<div class="selected padding-left-10px c-salt-600"></div>
      </div>
    </div>
  `
});

Vue.component('binarycard-3', {
  template: `
    <div class="binary binary-active" tabindex="0">
      <label for="item-1" class="binary-label">
        <h4 class="binary-heading">Social Network</h4>
        <div class="binary-text">
          <p>Deserunt illum officiis quae mollitia, ea dolorum, incidunt sed ab culpa tempora expedita</p>
        </div>
      </label>
      <div class="binary-footer">
        <input name="process" class="binary-input" type="radio" id="item-1" checked>
<svg viewBox="0 0 32 32" width="32" height="32">
    <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <g id="Group" transform="translate(1.000000, 1.000000)">
            <circle class="circle" id="Oval-2-Copy" stroke="#FFFFFF" stroke-width="2" fill="#25D6C9" cx="15" cy="15" r="15"></circle>
            <path class="tick" d="M20.0747692,7.52428966 L13.4768525,19.2462557 L9.78532063,15.7550564 C9.39532649,15.3318808 8.74224106,15.310722 8.32645366,15.7127389 C7.91066625,16.1041764 7.88899991,16.7812574 8.27899406,17.2044331 L12.996066,21.6689364 C13.3850285,22.0921121 14.0381139,22.1132708 14.4539013,21.711254 C14.5797724,21.5948807 21.8617265,8.58222884 21.8617265,8.58222884 C22.1464841,8.08499742 21.9772803,7.42907514 21.4841131,7.14343156 C20.9899142,6.84720859 20.3595269,7.02705825 20.0747692,7.52428966 Z" id="Path-Copy" fill="#FFFFFF"></path>
        </g>
    </g>
</svg>
<div class="selected padding-left-10px c-salt-600"></div>
      </div>
    </div>
  `
});


new Vue({
  el: '#vue-app',
  components: {
    appPage: Page
  }
});

Vue.component('page', {
  template: '<div>{{ page.text }}</div>'
})

            
          
!
999px

Console