HTML Js Css
HTML Js Css
<!DOCTYPE html>
<html lang="en">
<head>
<title>Login/Register UI</title>
</head>
<body>
<div class="container">
<div class="tabs">
<button id="registerTab">Register</button>
</div>
<div class="socials">
<button class="social">G</button>
<button class="social">f</button>
<button class="social">t</button>
</div>
</form>
<div class="socials">
<button class="social">G</button>
<button class="social">f</button>
<button class="social">t</button>
</div>
</form>
</div>
<script src="script.js"></script>
</body>
</html>
CSS :
body {
margin: 0;
padding: 0;
background: #e0e5ec;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
.container {
background: #e0e5ec;
padding: 30px;
border-radius: 20px;
width: 300px;
.tabs {
display: flex;
justify-content: space-between;
margin-bottom: 20px;
}
.tabs button {
flex: 1;
padding: 10px;
border: none;
background: none;
font-weight: bold;
cursor: pointer;
border-radius: 10px;
transition: 0.3s;
.tabs button.active {
background: #d1d9e6;
box-shadow: inset 2px 2px 5px #bec4cb, inset -2px -2px 5px #f0f5fa;
.form {
display: none;
flex-direction: column;
.form.active {
display: flex;
}
input {
margin: 10px 0;
padding: 12px;
border-radius: 10px;
border: none;
background: #e0e5ec;
box-shadow: inset 4px 4px 6px #c8ccd1, inset -4px -4px 6px #f0f5fa;
.btn {
margin-top: 10px;
padding: 12px;
background: #e0e5ec;
border: none;
border-radius: 10px;
cursor: pointer;
font-weight: bold;
transition: 0.3s;
.btn:hover {
background: #d6dce4;
}
.or {
text-align: center;
font-size: 0.85em;
color: #666;
.socials {
display: flex;
justify-content: space-around;
.social {
width: 40px;
height: 40px;
border-radius: 50%;
border: none;
background: #e0e5ec;
font-size: 1.2em;
cursor: pointer;
JAVASCRIPT:
loginTab.addEventListener("click", () => {
loginTab.classList.add("active");
registerTab.classList.remove("active");
loginForm.classList.add("active");
registerForm.classList.remove("active");
});
registerTab.addEventListener("click", () => {
registerTab.classList.add("active");
loginTab.classList.remove("active");
registerForm.classList.add("active");
loginForm.classList.remove("active");
});
index.html
style.css
script.js