galaxy/Forms/krlozCJ_average-snake-9.html

147 lines
3.6 KiB
HTML

<div class="container">
<input id="register_toggle" type="checkbox">
<div class="slider">
<form class="form">
<span class="title">Login</span>
<div class="form_control">
<input required="" class="input" type="text">
<label class="label">Username</label>
</div>
<div class="form_control">
<input required="" class="input" type="password">
<label class="label">Password</label>
</div>
<button>Login</button>
<span class="bottom_text">Don't have an account? <label class="swtich" for="register_toggle">Sign Up</label> </span>
</form>
<form class="form">
<span class="title">Sign Up</span>
<div class="form_control">
<input required="" class="input" type="text">
<label class="label">Username</label>
</div>
<div class="form_control">
<input required="" class="input" type="email">
<label class="label">Email</label>
</div>
<div class="form_control">
<input required="" class="input" type="password">
<label class="label">Password</label>
</div>
<button>Sign Up</button>
<span class="bottom_text">Already have an account? <label class="swtich" for="register_toggle">Sign In</label> </span>
</form>
</div>
</div>
<style>
/* From Uiverse.io by krlozCJ - Tags: neumorphism, login, form */
.container {
width: 300px;
position: relative;
border-radius: 5px;
overflow: hidden;
box-shadow: 1.5px 1.5px 3px #0e0e0e, -1.5px -1.5px 3px rgb(95 94 94 / 25%), inset 0px 0px 0px #0e0e0e, inset 0px -0px 0px #5f5e5e;
}
.container .slider {
width: 200%;
position: relative;
transition: transform ease-out 0.3s;
display: flex;
}
#register_toggle {
display: none;
}
.container #register_toggle:checked + .slider {
transform: translateX(-50%);
}
.form {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 30px;
padding: 1.5em 3em;
width: 50%;
}
.title {
text-align: center;
font-weight: 700;
font-size: 2em;
}
form .form_control {
width: 100%;
position: relative;
overflow: hidden;
}
form .form_control .label {
position: absolute;
top: 50%;
left: 10px;
transition: transform ease 0.2s;
transform: translate(0%, -50%);
font-size: 0.75em;
user-select: none;
pointer-events: none;
color: #b0b0b0;
}
form .form_control .input {
width: 100%;
background-color: transparent;
border: none;
outline: none;
color: #fff;
padding: 0.5rem;
font-size: 0.75rem;
border-radius: 5px;
transition: box-shadow ease 0.2s;
box-shadow: 0px 0px 0px #0e0e0e, 0px 0px 0px rgb(95 94 94 / 25%), inset 1.5px 1.5px 3px #0e0e0e, inset -1.5px -1.5px 3px #5f5e5e;
}
form .form_control .input:focus,
form .form_control .input:valid {
box-shadow: 0px 0px 0px #0e0e0e, 0px 0px 0px rgb(95 94 94 / 25%), inset 3px 3px 4px #0e0e0e, inset -3px -3px 4px #5f5e5e;
}
form .form_control .input:focus + .label,
form .form_control .input:valid + .label {
transform: translate(-150%, -50%);
}
form button {
width: 100%;
background-color: transparent;
border: none;
outline: none;
color: #fff;
padding: 0.5rem;
font-size: 0.75rem;
border-radius: 5px;
transition: box-shadow ease 0.1s;
box-shadow: 1.5px 1.5px 3px #0e0e0e, -1.5px -1.5px 3px rgb(95 94 94 / 25%), inset 0px 0px 0px #0e0e0e, inset 0px -0px 0px #5f5e5e;
}
form button:active {
box-shadow: 0px 0px 0px #0e0e0e, 0px 0px 0px rgb(95 94 94 / 25%), inset 3px 3px 4px #0e0e0e, inset -3px -3px 4px #5f5e5e;
}
.bottom_text {
font-size: 0.65em;
}
.bottom_text .swtich {
font-weight: 700;
cursor: pointer;
}
</style>