Views 204
Login Registration Screens Components

Login Registration Screens Components Here are components in single-page login registration forms with swap animations with crazy spline design animations.
Login Registration Screens Components

Prerequests: tailwind css , HTML, Js & CSS
Connections : Googles fonts and icons
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdn.tailwindcss.com"></script>
<title>crazy login screen</title>
</head>
<body class="m-0 p-0">
<section class="bg-white-1000 w-[100%] h-[100vh] flex justify-center items-center gap-x-[70px]">
<div class="flex justify-between items-stretch h-[95vh] w-[100%] px-[20px] gap-x-[70px]" >
<div style="width: 50%; height: 95vh;" class="my-auto video-div " >
<iframe
src="https://my.spline.design/untitled-e0e807542552f95e92e67ab9e1801788/"
frameborder="0"
width="100%"
height="100%"
allowfullscreen>
</iframe>
</div>
<div class="flex items-center w-[50%]">
<!--=============== LOGIN ===============-->
<div class="login container grid" id="loginAccessRegister">
<!--===== LOGIN ACCESS =====-->
<div class="login__access">
<h1 class="login__title">Log in to your account.</h1>
<div class="login__area">
<form action="" class="login__form">
<div class="login__content grid">
<div class="login__box">
<input type="email" id="email" required placeholder=" " class="login__input">
<label for="email" class="login__label">Email</label>
<i class="ri-mail-fill login__icon"></i>
</div>
<div class="login__box">
<input type="password" id="password" required placeholder=" " class="login__input">
<label for="password" class="login__label">Password</label>
<i class="ri-eye-off-fill login__icon login__password" id="loginPassword"></i>
</div>
</div>
<a href="#" class="login__forgot">Forgot your password?</a>
<button type="submit" class="login__button">Login</button>
</form>
<div class="login__social">
<p class="login__social-title">Or login with</p>
<div class="login__social-links">
<a href="#" class="login__social-link">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAABUFBMVEX////qQzU0qFNChfT7vAUvfPPb5v07gvSDq/c1f/T7uQCxyPrqQTP/vQD7uADpOSnpMB0opUvpNiXqPS4fo0b50c/pOTf8wQAbokRDg/vylpDpLxscp1bznpn98O/pKhP/9+W43cHsXl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dldc6jKu/wXuS9F39ULUHEQgdGpOvweDbDcG5ur/pvrv/8DCmA64IxT25Ah5OoNshEyqWqWu6IPn/msVZBuEZWaiRlREB9KmHPrGsjXsnYqmEbAWQLZBWGam6kdZinNI1TBNsX/X6JWGjkq3vUa3L5o2XNjPA2wDZ+PrI7L+FAWqGhPZf4L+z4XaBkk341HkpRhZIbaRxtjZ+4usBY8VMcg2ItTRue4IdsPxKsA2iL3eo1iqTTTE6//5I+7BB4gJRxSv//uhX6bijNeCFLG3iQfx/c1qGIn2TL5q8eYTHdtYaXDS0ZzQi8g/T1dtI54qMxPBjDh+eW0jUjuaVER1cG8bkXuZZCKKc9vYuyHdEwYgJmEt2rbhHmfQALTLzSAJjMZ7O1P3bmIywkQiOrZBJYKu+slYjL9RAxSELvedhnM6Qo/PVo87okn7QmQbvD2nBEj9mpnQ5LoYYz2GRSqGCRwpX8xH6UgNRT6ZSn0J3qt5yiGMqsHq5ryrIfOCE9cROlhNttYY9eCVSO0Bu6Jqsg7gVD1GqaqKTFfgolrdoHOVuPiMBqMvV3zVpl1VVbPLJ0EXGPuI4794+PpMv1VFyI4jHUbVPE0Cn6NWlwJjAvJzUc2e31F8FLwB1/riq+FpbIXVME4Zf+8PVKs3iAFSNfq3SUrPJbUbAyNCq6MaBvSKCke1en2TZE2qqml0S4nHm6rd6JuB90iW4QxT7N4mxRqgat92+0bIjRLVvYkyOEXcuFkHtYa9bn8gmnZE3UsmUxmGDWaKg363UWonzhUI1Gy22u5FocadrUavd1satlvNTUDbaqutttpqq60Sof8Do1G19/Q7LxwAAAAASUVORK5CYII=" alt="image" class="login__social-img">
</a>
<a href="#" class="login__social-link">
<img src="https://cdn-icons-png.freepik.com/256/15047/15047435.png?semt=ais_hybrid" alt="image" class="login__social-img">
</a>
<a href="#" class="login__social-link">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAflBMVEUAd7f///8AcrUAbrMAdLbA2+uRuNex0eY+k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2hITSEhtAQGkJDaAivCUH3GzETwlICv9WeDourDwz0AMxiL534nEKuUtcvEsISzwNv7nJQhBP5xOe0I7tjpc+7a3asJ7NnKeDFrqIKkPAf4Kc1PL+3x53uC/G4t+kbSrWIh/13LEcE+yraI+h8QXZoysPgJN1JR9LDgImB857JJh0badfbf9gt+gjb0vcwErcVsu2cDZv5BM3bH2bnYnxodt4uqULDZ4Wuh+mZ2MvoVyPjfT+9EiIbTgKLQmLrPUy5TaTNORxyAiIfUhGF6JxEuiTWbhaLyELzcbgg40K2P7ucpUUsV+duytyCUDr8EAKVodCIZUWTJdp7OoniE65M4BjrOhKdMuhiSejruiRS/5uwN8QmUl18mpc0o+2hfBHrO7npdyLVlX6tWCX/rFLFzjrST2OUQyu3+08yXD8W+qyLXMQ/DturdL9RzvRoR4flV67M64TGqbvkjDqYm7JMPM+X7rU7upayeRHNAzvE6rtJQjuYR7XEEf8Hv9yYWp88rfoAAAAASUVORK5CYII=" alt="image" class="login__social-img">
</a>
</div>
</div>
<p class="login__switch">
Don't have an account?
<button id="loginButtonRegister">Create Account</button>
</p>
</div>
</div>
<!--===== LOGIN REGISTER =====-->
<div class="login__register">
<h1 class="login__title">Create new account.</h1>
<div class="login__area">
<form action="" class="login__form">
<div class="login__content grid">
<div class="login__group grid">
<div class="login__box">
<input type="text" id="names" required placeholder=" " class="login__input">
<label for="names" class="login__label">Names</label>
<i class="ri-id-card-fill login__icon"></i>
</div>
<div class="login__box">
<input type="text" id="surnames" required placeholder=" " class="login__input">
<label for="surnames" class="login__label">Surnames</label>
<i class="ri-id-card-fill login__icon"></i>
</div>
</div>
<div class="login__box">
<input type="email" id="emailCreate" required placeholder=" " class="login__input">
<label for="emailCreate" class="login__label">Email</label>
<i class="ri-mail-fill login__icon"></i>
</div>
<div class="login__box">
<input type="password" id="passwordCreate" required placeholder=" " class="login__input">
<label for="passwordCreate" class="login__label">Password</label>
<i class="ri-eye-off-fill login__icon login__password" id="loginPasswordCreate"></i>
</div>
</div>
<button type="submit" class="login__button">Create account</button>
</form>
<p class="login__switch">
Already have an account?
<button id="loginButtonAccess">Log In</button>
</p>
</div>
</div>
</div>
</div>
</div>
</section>
</body>
</html>
CSS -Login Registration Screens Components
<style>
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap');
/*=============== VARIABLES CSS ===============*/
:root {
/*========== Colors ==========*/
/*Color mode HSL(hue, saturation, lightness)*/
--first-color: hsl(208, 92%, 54%);
--first-color-alt: hsl(208, 88%, 50%);
--title-color: hsl(220, 68%, 4%);
--white-color: hsl(0, 0%, 100%);
--text-color: hsl(220, 15%, 66%);
--body-color: hsl(0, 0%, 100%);
--container-color: hsl(220, 50%, 97%);
/*========== Font and typography ==========*/
/*.5rem = 8px | 1rem = 16px ...*/
--body-font: "Montserrat", system-ui;
--big-font-size: 1rem;
--normal-font-size: .938rem;
--small-font-size: .813rem;
--tiny-font-size: .688rem;
/*========== Font weight ==========*/
--font-regular: 400;
--font-medium: 500;
--font-semi-bold: 600;
/*========== z index ==========*/
--z-tooltip: 10;
--z-fixed: 100;
}
/*========== Responsive typography ==========*/
@media screen and (min-width: 1150px) {
:root {
--big-font-size: 3rem;
--normal-font-size: 1rem;
--small-font-size: .875rem;
--tiny-font-size: .75rem;
}
}
body {
font-family: 'DM Sans', sans-serif;
}
* {
box-sizing: border-box;
}
.video-div{
border-radius: 3rem;
overflow: hidden;
}
/*=============== REUSABLE CSS CLASSES ===============*/
.container {
max-width: 1120px;
margin-inline: 1.5rem;
}
.grid {
display: grid;
gap: 1rem;
}
/*=============== LOGIN ===============*/
.login {
position: relative;
height: 100vh;
align-items: center;
overflow: hidden;
}
.login__blob {
display: none;
}
.login__title {
font-size: var(--big-font-size);
color: var(--title-color);
text-align: center;
margin-bottom: 2rem;
}
.login__box {
position: relative;
display: flex;
align-items: center;
background-color: var(--container-color);
border-radius: 1rem;
}
.login__input {
background: none;
width: 100%;
padding: 1.5rem 2.5rem 1.5rem 1.25rem;
font-weight: var(--font-semi-bold);
border: 3px solid transparent;
border-radius: 1rem;
z-index: 1;
transition: border-color .4s;
}
.login__input:autofill {
transition: background-color 6000s, color 6000s;
}
.login__label {
position: absolute;
left: 1.25rem;
font-weight: var(--font-semi-bold);
transition: transform .4s, font-size .4s, color .4s;
}
.login__icon {
position: absolute;
right: 1rem;
font-size: 1.25rem;
transition: color .4s;
}
.login__password {
cursor: pointer;
z-index: 10;
}
.login__forgot {
display: block;
width: max-content;
margin: 1rem 0 0 auto;
font-size: var(--small-font-size);
font-weight: var(--font-semi-bold);
color: var(--text-color);
transition: color .4s;
}
.login__forgot:hover {
color: var(--first-color);
}
.login__button {
width: 100%;
display: inline-flex;
justify-content: center;
background-color: var(--first-color);
color: var(--white-color);
font-weight: var(--font-semi-bold);
padding-block: 1.5rem;
border-radius: 4rem;
margin-block: 2rem;
cursor: pointer;
transition: background-color .4s, box-shadow .4s;
}
.login__button:hover {
background-color: var(--first-color-alt);
box-shadow: 0 8px 24px hsla(208, 92%, 32%, .3);
}
.login__social {
margin-bottom: 2rem;
}
.login__social-title {
text-align: center;
font-size: var(--small-font-size);
font-weight: var(--font-semi-bold);
color: var(--title-color);
margin-bottom: 1rem;
}
.login__social-img {
width: 1rem;
}
.login__social-links {
display: flex;
justify-content: center;
column-gap: 1.5rem;
}
.login__social-link {
width: 32px;
height: 32px;
background-color: var(--body-color);
box-shadow: 0 4px 8px hsla(0, 0%, 0%, .1);
border-radius: .5rem;
display: grid;
place-items: center;
transition: transform .4s;
}
.login__social-link:hover {
transform: translateY(-.25rem);
}
.login__switch {
text-align: center;
font-size: var(--small-font-size);
}
.login__switch button {
background: none;
color: var(--first-color);
font-size: var(--small-font-size);
font-weight: var(--font-semi-bold);
cursor: pointer;
transition: color .4s;
}
.login__switch button:hover {
color: var(--first-color-alt);
}
.login__access,
.login__register {
position: absolute;
left: 0;
right: 0;
width: 100%;
transition: transform .4s, opacity .4s .1s;
}
.login__register {
transform: translateX(15rem);
opacity: 0;
pointer-events: none;
}
/* Input focus move up label */
.login__input:focus ~ .login__label {
transform: translateY(-12px);
font-size: var(--tiny-font-size);
}
.login__input:focus {
padding-block: 2rem 1rem;
}
/* Input focus sticky top label */
.login__input:not(:placeholder-shown).login__input:not(:focus) ~ .login__label {
transform: translateY(-12px);
font-size: var(--tiny-font-size);
}
.login__input:not(:placeholder-shown).login__input:not(:focus) {
padding-block: 2rem 1rem;
}
/* Input focus color */
.login__input:focus {
border-color: var(--first-color);
}
.login__input:focus ~ .login__label,
.login__input:focus ~ .login__icon {
color: var(--first-color);
}
/* Show hide login & create account */
.active .login__access {
transform: translateX(15rem);
opacity: 0;
pointer-events: none;
}
.active .login__register {
transform: translateX(0);
opacity: 1;
pointer-events: initial;
}
/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 320px) {
.container {
margin-inline: 1rem;
}
}
/* For medium devices */
@media screen and (min-width: 540px) {
.login__area {
width: 380px;
margin-inline: auto;
}
}
@media screen and (min-width: 350px) and (max-height: 600px) {
.login {
height: 760px;
}
}
/* For large devices */
@media screen and (min-width: 1150px) {
.container {
margin-inline: auto;
}
.login__area {
width: 460px;
margin: initial;
}
.login__access,
.login__register {
width: 600px;
}
.login__title {
text-align: initial;
margin-bottom: 3rem;
}
.login__button {
margin-bottom: 3rem;
}
.login__group {
grid-template-columns: repeat(2, 1fr);
}
}
</style>
JS – Login Registration Screens Components
<script >
/*=============== SHOW HIDE PASSWORD LOGIN ===============*/
const passwordAccess = (loginPass, loginEye) =>{
const input = document.getElementById(loginPass),
iconEye = document.getElementById(loginEye)
iconEye.addEventListener('click', () =>{
// Change password to text
input.type === 'password' ? input.type = 'text'
: input.type = 'password'
// Icon change
iconEye.classList.toggle('ri-eye-fill')
iconEye.classList.toggle('ri-eye-off-fill')
})
}
passwordAccess('password','loginPassword')
/*=============== SHOW HIDE PASSWORD CREATE ACCOUNT ===============*/
const passwordRegister = (loginPass, loginEye) =>{
const input = document.getElementById(loginPass),
iconEye = document.getElementById(loginEye)
iconEye.addEventListener('click', () =>{
// Change password to text
input.type === 'password' ? input.type = 'text'
: input.type = 'password'
// Icon change
iconEye.classList.toggle('ri-eye-fill')
iconEye.classList.toggle('ri-eye-off-fill')
})
}
passwordRegister('passwordCreate','loginPasswordCreate')
/*=============== SHOW HIDE LOGIN & CREATE ACCOUNT ===============*/
const loginAcessRegister = document.getElementById('loginAccessRegister'),
buttonRegister = document.getElementById('loginButtonRegister'),
buttonAccess = document.getElementById('loginButtonAccess')
buttonRegister.addEventListener('click', () => {
loginAcessRegister.classList.add('active')
})
buttonAccess.addEventListener('click', () => {
loginAcessRegister.classList.remove('active')
})
</script>
For animated spline link – Login Registration Screens Components
https://my.spline.design/untitled-e0e807542552f95e92e67ab9e1801788
Read more about our Blog posts