Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <html ng-app="ionicApp">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">

    <title>Ionic Pull to Refresh</title>

    <link href="//code.ionicframework.com/nightly/css/ionic.css" rel="stylesheet">
    <script src="//code.ionicframework.com/nightly/js/ionic.bundle.js"></script>
    
  </head>
  <body ng-controller="MyCtrl">

    <ion-header-bar class="bar-positive">
      <h1 class="title">Blank Starter</h1>
    </ion-header-bar>

  <ion-content class="padding-vertical" delegate-handle="manage-family-member-handle">

    <form name="Manage.form" novalidate ng-submit="Manage.saveFamilyMember()">

      <div class="list">

        <span class="field-info-wrapper">

          <i class="icon ion-information-circled field-info-icon" info-topic="givenName"></i>

          <label
            class="item item-input item-stacked-label item-icon-right">
            <span class="input-label"
                  ng-class="{ 'has-error' : Manage.form.givenName.$invalid && Manage.form.$submitted}">
              First Name
            </span>
            <input
              type="text"
              name="givenName"
              ng-model="Manage.familyMember.givenName"
              ng-minlength="1"
              ng-maxlength="100"
              required
              placeholder="Use the real first name"
              focus-styling="">
          </label>

        </span>

        <span class="field-info-wrapper">

          <i class="icon ion-information-circled field-info-icon" info-topic="homeScreenName"></i>

          <label
            class="item item-input item-stacked-label item-icon-right">
            <span class="input-label"
                  ng-class="{ 'has-error' : Manage.form.calledName.$invalid && Manage.form.$submitted}">
              Home Screen Name
            </span>
            <input
              type="text"
              name="calledName"
              ng-model="Manage.familyMember.calledName"
              ng-minlength="1"
              ng-maxlength="100"
              placeholder="Family Nickname (Mom or Dad)"
              focus-styling="">
          </label>
        </span>

        <span class="field-info-wrapper">

          <i class="icon ion-information-circled field-info-icon" info-topic="familyName"></i>

          <label
            class="item item-input item-stacked-label item-icon-right">
            <span class="input-label"
                  ng-class="{ 'has-error' : Manage.form.family_name.$invalid && Manage.form.$submitted}">
              Last Name
            </span>
            <input
              type="text"
              name="familyName"
              ng-model="Manage.familyMember.familyName"
              ng-minlength="1"
              ng-maxlength="100"
              required
              placeholder="Family member's last name"
              focus-styling="">
          </label>

        </span>


        <span class="field-info-wrapper">

          <i class="icon ion-information-circled field-info-icon" info-topic="secretPin"></i>

          <label
            class="item item-input item-stacked-label item-icon-right">
            <span class="input-label"
                  ng-class="{ 'has-error' : Manage.form.secretPin.$invalid && Manage.form.$submitted}">
              Secret PIN
            </span>
            <input
              type="tel"
              name="secretPin"
              ng-model="Manage.familyMember.secretPin"
              ng-minlength="4"
              ng-maxlength="4"
              maxlength="4"
              required
              focus-styling=""
              placeholder="A 4 digit Secret PIN"
              >
          </label>

        </span>

        <span class="field-info-wrapper">

          <i class="icon ion-information-circled field-info-icon" info-topic="isParent"></i>

          <li class="item item-toggle">
            {{Manage.familyMember.givenName}} Is A Parent</i>
            <label class="toggle toggle-positive">
              <input type="checkbox" name="parent" ng-model="Manage.familyMember.parent" ng-disabled="Manage.familyMember.accountCreator">
              <div class="track">
                <div class="handle"></div>
              </div>
            </label>
          </li>

        </span>

        <span class="field-info-wrapper">

          <i class="icon ion-information-circled field-info-icon" info-topic="secretPinRequired"></i>

          <li class="item item-toggle item-text-wrap wrapped">
            Secret PIN Required <br/>On This Device
            <label class="toggle toggle-positive">
              <input type="checkbox" name="parent" ng-model="Manage.familyMember.$secretPinRequired">
              <div class="track">
                <div class="handle"></div>
              </div>
            </label>
          </li>

        </span>


        <div class="padding">
          <button
            class="button button-block button-positive"
            ng-disabled="Manage.saving || Manage.form.$pristine">
            Save
          </button>
        </div>

        <div class="padding">

          <div class="form-errors" ng-messages="Manage.form.Manage.$error" ng-show="Manage.form.Manage.$error && Manage.form.$submitted">
            <div class="form-error" ng-message="maxlength">Status should be less than 100 characters long.</div>
          </div>

          <div class="form-errors" ng-messages="Manage.form.secretPin.$error" ng-show="Manage.form.secretPin.$error && Manage.form.$submitted">
            <div class="form-error" ng-message="required">Secret PIN should be 4 digits long.</div>
            <div class="form-error" ng-message="minlength">Secret PIN should be 4 digits long.</div>
            <div class="form-error" ng-message="maxlength">Secret PIN should be 4 digits long.</div>
          </div>

        </div>

      </div>

    </form>

  </ion-content>
  </body>
</html>

              
            
!

CSS

              
                .field-info-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.field-info-icon {
  position: absolute;
  color: #87C6FD;
  font-size: 16px;
  z-index: 4;
  padding: 10px;
  top: -5px;
  right: 9px;
}

.field-info-wrapper.field-info-checkbox .field-info-icon {
  top: 5px;
}

.field-info-wrapper .item-toggle .toggle {
  right: 55px;
}

.field-info-wrapper .item-toggle, .item-toggle.item-complex .item-content {
  padding-right: 115px;
}

.input-label {
  font-size: 15px;
  color: #BBB;
  font-weight: 500;
}

label.item {
  border-left: 10px solid $light;
  border-right: 4px solid $light;
  padding: 0 16px 0 10px;
  border-top: 0;
  border-bottom: 0;
}

.item.item-toggle {
  padding-left: 20px;
  border-style: none;
  margin-top: -12px;
  margin-bottom: 2px;
  font-size: 15px;
  color: #BBB;
  font-weight: 500;
}


              
            
!

JS

              
                angular.module('ionicApp', ['ionic'])

.controller('MyCtrl', function($scope) {
})
.directive('fieldInfoIcon', function() {
    return {

      restrict: 'C',

      link: function(scope, element, attrs) {

        element.on('click', function() {
          alert('Show info message for ' + attrs.infoTopic);
        });

      }

    };
  
})
              
            
!
999px

Console