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/>
<ps-contact-form
   integration-key="4de0324ba2d718b4df262fec25ef351d484197beeda5fcca5ecd5e8cd6b59cba"
   full-name-placeholder-text="Full Name"
   email-placeholder-text="Email"
   message-placeholder-text="Message"
   submit-button-text="Submit"
   success-message="Thank you for contacting us, we will get back to your shortly"
   tags="homepage, before-footer"
   ></ps-contact-form>
<br/>
<a href="https://www.npmjs.com/package/ps-contact-form" target="_blank"><strong>Read the docs</strong></a> (opens in npmjs.com)
<br/>
<br/>
For this demo, we have integrated the contact form with email. We are using Mailinator's 
<a href="https://www.mailinator.com/v4/public/inboxes.jsp?to=ps-contact-form" target="_blank">public inbox</a>
<p style="color: #e74c3c; background: #fdedec; padding: 0.5em 1em 1em 1em; border-radius: 0.5em;">
   <strong>WARNING:</strong>
   The above inbox is public. <u>Please do not use your real name and email for this demo</u>
</p>
<p style="color: #917609; background: #fcf3cf; padding: 0.5em 1em 1em 1em; border-radius: 0.5em;">
   <strong>Remember:</strong> Submitted emails might take a few moments before appearing in the above inbox
</p>
<br/> 
</p>
<!-- Widget script -->
<script type="module" src="https://unpkg.com/ps-contact-form/dist/ps-contact-form/ps-contact-form.esm.js" async></script>
              
            
!

CSS

              
                /* Defines component width */
ps-contact-form .container {
width: 300px;
}
/* Input styles */
ps-contact-form input {
box-sizing: border-box;
border: 2px solid rgba(0, 0, 0, 0.1);
padding: 1em;
font-size: 1em;
width: 70%;
outline: none;
width: 100%;
margin-bottom: 1em;
border-radius: 0.25em;
}
/* Textarea styles */
ps-contact-form textarea {
box-sizing: border-box;
border: 2px solid rgba(0, 0, 0, 0.1);
padding: 1em;
font-size: 1em;
width: 70%;
outline: none;
width: 100%;
font-family: sans-serif;
height: 150px;
border-radius: 0.25em;
}
/* Submit button styles */
ps-contact-form button {
font-size: 1em;
padding: 1em;
border: 1px solid rgba(0, 0, 0, 0.3);
width: 100%;
border-radius: 0.25em;
margin-top: 0.75em;
background: rgba(0, 0, 0, 0.6);
color: white;
}
ps-contact-form button:hover {
cursor: pointer;
background: rgba(0, 0, 0, 0.7);
}
/* Error message styles */
ps-contact-form .error-message {
background: #fadbd8;
color: #a2352a;
padding: 1em;
border-radius: 0.25em;
}
/* Success message styles */
ps-contact-form .success-message {
background: #d4efdf;
color: #1b7a43;
padding: 1em;
border-radius: 0.25em;
}
/* CSS spinner that appears inside the button during data submission */
ps-contact-form .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;
}
@keyframes spin {
to {
-webkit-transform: rotate(360deg);
}
}
@-webkit-keyframes spin {
to {
-webkit-transform: rotate(360deg);
}
}
@import url(https://fonts.googleapis.com/css?family=Sen);
body {
font-family: "Sen"
}
              
            
!

JS

              
                
              
            
!
999px

Console