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

              
                <br/>
<br/>
<!-- widget start -->
<!-- Change the width of the preview window to see the responsive nature of this widget -->
<ps-email-capture 
  integration-key="e2976294d86afd2257088e297cfe9ef64a2d5a8cfb74cfca4b962b708f5d3619"   
  tags="codepen, demo" 
  input-placeholder-text="Your email" 
  submit-button-text="Join Now" 
  success-message="Congrats! you have joined our list" 
  invalid-email-message="The email you entered is invalid" 
  failure-message="Oops, something went wrong" 
  btn-classes="Your bootstrap/Foundation button classes e.g. btn btn-primary">
</ps-email-capture>
<!-- widget-end -->
<br/>
<br/>
<p> 
  Submitted emails will appear in
  <a href="https://airtable.com/shr4GcLdR9a9lUuF0" target="_blank"><strong>Airtable (Backup)</strong>
  </a> 
  <br/> 
  You can add extra columns like in
  <a href="https://airtable.com/shrIUzkPQLGrfBhrC" target="_blank"><strong>Airtable (Tracking)</strong>
  </a> as per your needs
  
  <br/>
  <br/>
  <span style="color:red">
    <strong>Warning: </strong>
    The above airtable bases are <u>public and read-only</u>.
    Kindly use fake emails for submissions<br/> e.g. this-is@a-fake-email.com</span></p>
<p>
<p>
<strong>Remember:</strong> Kindly refresh the above links in case emails don't appear after submitting
</p>
  <br/>
  <strong><a href="https://www.npmjs.com/package/ps-email-capture" target="_blank">
    Read the docs</a></strong> (opens in npmjs.com)<br/> 
</p>



<!-- Widget script -->
<script type="module" src="https://unpkg.com/ps-email-capture/dist/ps-email-capture/ps-email-capture.esm.js" async></script>
              
            
!

CSS

              
                /* Defines widget width */
  ps-email-capture .container {
    width: 400px;
  }

  /* .input-group is the container of the inputbox and submit button */
  /* display:flex, aligns the inputbox and submit button in a row*/
  ps-email-capture .input-group {
    display: flex;
  }

  /* Inputbox styles */
  ps-email-capture .email-input {
    box-sizing: border-box;
    border: 2px solid rgba(0, 0, 0, 0.2);
    padding: 1em;
    font-size: 1em;
    width: 65%;
    outline: none;
    border-radius: 0.25em 0 0 0.25em;
    border-right: 0;
  }

  /* Submit button styles */
  ps-email-capture .submit-button {
    border: 0;
    outline: none;
    font-size: 1em;
    width: 35%;
    border-left: 0;
    background: #3498db;
    color: #ebf5fb;
    border-radius: 0 0.25em 0.25em 0;
  }

ps-email-capture .submit-button:hover {
  cursor: pointer;
  background: #2f89c5;
}

  /* Error message styles */
  ps-email-capture .error-message {
    background: #fadbd8;
    color: #a2352a;
    padding: 1em;
    border-radius: 0.25em;
  }

  /* Success message styles */
  ps-email-capture .success-message {
    background: #d4efdf;
    color: #1b7a43;
    padding: 1em;
    border-radius: 0.25em;
  }

  /* CSS spinner that appears inside the button during email submission */
  ps-email-capture .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    -webkit-animation: spin 1s ease-in-out infinite;
  }

  /* Input style when email is valid */
  ps-email-capture .valid-email-input {
    border: 1px solid green;
  }

  /* Input style when email is invalid */
  ps-email-capture .invalid-email-input {
    border: 1px solid red;
  }

  @keyframes spin {
    to {
      -webkit-transform: rotate(360deg);
    }
  }

  @-webkit-keyframes spin {
    to {
      -webkit-transform: rotate(360deg);
    }
  }

  /* Responsive code for tablet and mobile  */
  @media only screen and (max-width: 768px) {
    ps-email-capture .input-group {
      display: block;
    }

    ps-email-capture .container {
      width: 100%;
    }

    ps-email-capture .email-input {
      width: 100%;
      margin-bottom: 0;
      text-align: center;
      padding: 0.75em;
    }

    ps-email-capture .submit-button {
      width: 100%;
      margin-top: 0;
      padding: 0.75em;
      border: 1px solid rgba(0, 0, 0, 0.6);
      border-top: 0;
    }
  }


@import url(https://fonts.googleapis.com/css?family=Sen);

body {
  font-family: "Sen"
}
              
            
!

JS

              
                
              
            
!
999px

Console