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

              
                <base href="https://raw-dot-custom-elements.appspot.com/PolymerElements/gold-cc-input/v2.0.0/gold-cc-input/">
<script src="../webcomponentsjs/webcomponents-lite.js"></script>

<link rel="import" href="gold-cc-input.html">
<link rel="import" href="../paper-styles/demo-pages.html">

<body unresolved>
  <div class="vertical-section-container centered">
    <h4>Standard</h4>
    <div class="vertical-section">
      <gold-cc-input></gold-cc-input>
      <gold-cc-input auto-validate required label="Auto-validating"></gold-cc-input>
    </div>

    <h4>Pre-validated</h4>
    <div class="vertical-section">
      <gold-cc-input label="Visa" value="4000 0000 0000 0002" auto-validate></gold-cc-input>
      <gold-cc-input label="MasterCard" value="5100 0000 0000 0008" auto-validate></gold-cc-input>
      <gold-cc-input label="Discover" value="6011 0000 0000 0004" auto-validate></gold-cc-input>
      <gold-cc-input label="Invalid Discover Card" value="6011 0000 0000 1233" auto-validate></gold-cc-input>
    </div>

    <h4>Custom error message, auto-validates on blur</h4>
    <div class="vertical-section">
      <gold-cc-input auto-validate label="Cats only" error-message="needs more cats" required></gold-cc-input>
    </div>

    <h4>Allowable card-types, auto-validates</h4>
    <div class="vertical-section">
      <gold-cc-input auto-validate label="Card number" error-message="Enter valid visa or mastercard!" card-types='["visa", "mastercard"]' required>
      </gold-cc-input>
      <gold-cc-input auto-validate label="Card number" error-message="Invalid Discover Card!" card-types='["discover"]' value="6011 0000 0000 1233" required>
      </gold-cc-input>
      <div>
      </div>
</body>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console