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

              
                <body>
  <head>
    <title>Neumorphic SignIn</title>
  </head>
  <body>
    <section class='main'>
      <div class="tagline">
        <h1> Hello </h1>
        <h3>Why don't you sign in ?</h3>
      </div>
      <form>
        <div>
          <label for="username">Username</label>
          <input type="text" name="username" value="">
        </div>
        <div>
          <label for="password">Password</label>
          <input type="password" name="password" value="">
        </div>
        <button id="signUp" type="button" onclick="launchModal()">Sign Up</button>
         <button id="submit" type="submit">Let's Go</button>
      </form>
    </section>
<!--     <section id="backdrop">
       -->
    <div id="signUpModal" class="Modal" >
      <h4>Hey there</h4>
      <h2>Trying to sign up?</h2>
      <p>That's awesome! Just click the link below to get started... oh... wait... that's right, this isn't a real app. Lolz.</p>
      <button onclick="close()" id="signUpModalClose" class="close"> close</button>
    </div>
    <div id="toast" class="">
      <p><b>Oops.</b> It looks like I'm not a real app. Guess I'll just throw all this data away.</p>
    </div>
   
  <footer>
    <p><i> A Lazy Codepen by &copy; Amirah Chamble 2020</i></p>
  </footer>
  </body>
</body>
              
            
!

CSS

              
                *{
  margin: 0px;
  font-family: 'Open sans', sans-serif;
}

html{
  background: linear-gradient(125deg, #1c1c1c, #292e31);
}

body{
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: row;
  justify-content: center;
}

h1, h2, h3, h4, h5, h6 {
  color: #FF7C33;
  letter-spacing: 2px;
}

p{
  margin-top: 12px;
  margin-bottom: 12px;
  color: #FFFFFF;
  letter-spacing: 2px;
  font-size: .875em;
  line-height: 1.25em;
}

.main{
  margin: 64px 30%;
  width: 100%;
}
.tagline{
  margin-bottom: 32px;
  text-align: center;
  
}
.tagline h1{
  font-size: 2.5em;
  margin-bottom: 12px;
}
.tagline h3{
  font-size: 1em;
  font-weight: 300;
}

form{
  display: flex;
  flex-direction: column;
  justify-content: center;
}
form div{
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
form div label{
  color: #FF7C33;
  font-size: .75em;
  letter-spacing: 2px;
  margin-bottom: 6px;
}
form div input{
  border-radius: 50px;
  padding: 6px 24px;
  height: 2em;
  border-color: transparent;
  background-color: #292e31;
  box-shadow: inset 10px 10px 20px #1f2325, 
            inset -10px -10px 20px #333a3d;
  color: #cedbd4;
  font-size: 1em;
  font-weight: 200;
  letter-spacing: 2px;
}
input:focus{
  outline-color: #FF7C33;
  cursor: #FF7C33;
  color: #FFFFFF;
}
button:focus{
  outline-color: #FFFFFF;
}

button:hover{
  cursor: pointer;
}

#signUp{
  color: #FF7C33;
  text-decoration: none;
  letter-spacing: 2px;
  font-size: .75em;
  font-weight: 400;
  background: none;
  border: none;
  margin: 12px 0px 24px 0px;
}

#submit{
  color: #ffffff;
  border: none;
  font-size: 1em;
  letter-spacing: 2px;
  border-radius: 50px;
  padding: 12px;
  background: rgba(255, 124, 51, .3);
  box-shadow: inset 6px 6px 11px rgba(204, 99, 41, 1), 
            inset -6px -6px 11px rgba(255, 149, 61, 0.5);
}

footer{
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 100%;
  text-align: right;
  margin: 12px;
  letter-spacing: 2px;
  font-size: .5em;
  color: #FF7C33;
}

.Modal{
  visibility: hidden;
  position: absolute;
  z-index: 2;
  top: 30%;
  left: 10%;
  width: 70%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 24px;
  border-radius: 50px;
  background: linear-gradient(225deg, #25292c, #2c3134);
  box-shadow:  -41px 41px 82px #23272a, 
             41px -41px 82px #2f3538;
}

#signUpModal h4{
   color: #858a94;
   font-weight: 600;
}
.close{
  width: 100%;
  text-align: right;
  color: #858a94;
  background: none;
  border: none;
  letter-spacing: 2px;
  font-size: .75em;
  font-weight: 600;
}

#toast{
  position: absolute;
  visibility: hidden;
  z-index: 3;
  bottom: 0px;
  width: 70%;
  margin: auto;
  margin-bottom: 32px;
  padding: 24px;
  border-radius: 70px;
  background: linear-gradient(225deg, #25292c, #2c3134);
  box-shadow:  -41px 41px 82px #23272a, 
             41px -41px 82px #2f3538; 
}
#toast p{
  line-height: 1.5em;
  text-align: left;
}
#toast b{
  font-size: 1.5em;
  color: #FF7C33;
}
.show{
  visibility: visible;
  -webkit-animation: fadein 0.5s, 0.5s 2.5s;
  animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@-webkit-keyframes fadein {
  from {bottom: 0; opacity: 0;}
  to {bottom: 30px; opacity: 1;}
}

@-webkit-keyframes fadeout {
  from {bottom: 30; opacity: 1;}
  to {bottom: 0px; opacity: 0;}
}
              
            
!

JS

              
                // modal variables /////////////////////
// Note!! modal close function not firing fix it

// sign up modal
var signUpModal = document.getElementById('signUpModal');
//button that opens modal
var signUpButton = document.getElementById('submit');
//element that closes modal
var signUpButtonClose = document.getElementsByClassName('close')[0];

///modal functions /////////////////////////

//click event that opens modal
function launchModal(){
  event.preventDefault();//prevent codepen reload error
  signUpModal.style.visibility = "visible";
}

//click event that closes modal
 function close(){
     event.preventDefault();//prevent codepen reload error
  signUpModal.style.visibility = "hidden";
}



//all things toasts /////////////////////////////

// toast variables /////////////////////////////
//submit button
 var submitButton = document.getElementById("submit");
// get toast
  var toast = document.getElementById("toast");

 var submitClose = document.getElementsByClassName('close')[1];

//toast functions //////////////////////////

  submitButton.onclick = function(){
   event.preventDefault();//prevent codepen reload error
  //display toast
  toast.style.visibility = "visible";
    toast.classList.add("show");
  //fade toast out of existence
   setTimeout(function(){ toast.classList.remove("show") ; }, 1000);

}
              
            
!
999px

Console