51 Search Inputs
Modern, responsive Search Inputs for sleek UI design
Edit & Get Code
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<div class="input-container">
<i class="fas fa-search icon"></i>
<input type="text" placeholder="Type something..." id="textInput">
<button class="clear-btn" onclick="clearInput()"><i class="fas fa-times"></i></button>
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
font-family: 'Arial', sans-serif;
background: linear-gradient(135deg, #e9eff4, #dee4ea);
}
.input-container {
position: relative;
display: flex;
align-items: center;
width: 300px;
height: 60px;
background: #f0f0f3;
border-radius: 15px;
box-shadow: inset 8px 8px 16px #c8c9cb, inset -8px -8px 16px #ffffff;
overflow: hidden;
}
.input-container:hover {
box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1), inset 8px 8px 16px #c8c9cb, inset -8px -8px 16px #ffffff;
}
.input-container:focus-within {
box-shadow: 0px 0px 12px 4px rgba(58, 123, 213, 0.6);
transition: box-shadow 0.3s ease-in-out;
}
.input-container input {
width: 100%;
height: 100%;
border: none;
background: none;
outline: none;
font-size: 16px;
padding: 0 50px 0 60px;
color: #333;
}
.input-container input::placeholder {
color: #aaa;
font-size: 14px;
transition: transform 0.3s, opacity 0.3s;
}
.input-container input:focus::placeholder {
transform: translateY(-20px);
opacity: 0;
}
.input-container i.icon {
position: absolute;
left: 20px;
color: #888;
font-size: 20px;
transition: color 0.3s;
}
.input-container input:focus~i.icon {
color: #3a7bd5;
}
.clear-btn {
position: absolute;
right: 15px;
background: none;
border: none;
outline: none;
font-size: 16px;
color: #aaa;
cursor: pointer;
opacity: 0;
transition: opacity 0.3s;
}
.clear-btn:hover {
color: #ff4b5c;
}
.input-container input:not(:placeholder-shown)~.clear-btn {
opacity: 1;
}
CSS Code Copied!
function clearInput() {
const input = document.getElementById('textInput');
input.value = '';
input.focus();
}
JS Code Copied!
Edit & Get Code
<!--Particles.js-->
<script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
<div id="particles-js"></div>
<!-- Search Input Container -->
<div class="search-container">
<input type="text" class="search-input" placeholder="Search here...">
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #181818, #2c2d2c, #1a1716);
color: white;
overflow: hidden;
font-family: Arial, sans-serif;
}
#particles-js {
position: absolute;
width: 100%;
height: 100%;
z-index: -1;
}
.search-container {
position: relative;
width: 300px;
}
.search-input {
width: 100%;
padding: 10px 15px;
border: 2px solid #ff5722;
border-radius: 20px;
background: rgba(255, 255, 255, 0.1);
color: white;
font-size: 16px;
outline: none;
transition: all 0.3s ease-in-out;
}
.search-input:focus {
border-color: #03a9f4;
box-shadow: 0 0 10px rgba(3, 169, 244, 0.8);
background: rgba(255, 255, 255, 0.2);
}
.search-input::placeholder {
color: rgba(255, 255, 255, 0.6);
}
CSS Code Copied!
particlesJS('particles-js', {
"particles": {
"number": {
"value": 150,
"density": {
"enable": true,
"value_area": 800
}
},
"color": {
"value": ["#ff5722", "#03a9f4", "#8bc34a", "#ffeb3b"]
},
"shape": {
"type": "circle",
"stroke": {
"width": 0,
"color": "#000000"
},
"polygon": {
"nb_sides": 6
}
},
"opacity": {
"value": 0.7,
"random": true,
"anim": {
"enable": true,
"speed": 1,
"opacity_min": 0.3,
"sync": false
}
},
"size": {
"value": 4,
"random": true,
"anim": {
"enable": true,
"speed": 5,
"size_min": 0.1,
"sync": false
}
},
"line_linked": {
"enable": true,
"distance": 120,
"color": "#ffffff",
"opacity": 0.5,
"width": 1
},
"move": {
"enable": true,
"speed": 3,
"direction": "none",
"random": true,
"straight": false,
"out_mode": "out",
"bounce": false,
"attract": {
"enable": true,
"rotateX": 600,
"rotateY": 1200
}
}
},
"interactivity": {
"detect_on": "canvas",
"events": {
"onhover": {
"enable": true,
"mode": "bubble"
},
"onclick": {
"enable": true,
"mode": "push"
},
"resize": true
},
"modes": {
"grab": {
"distance": 400,
"line_linked": {
"opacity": 1
}
},
"bubble": {
"distance": 200,
"size": 6,
"duration": 2,
"opacity": 0.8,
"speed": 3
},
"repulse": {
"distance": 150,
"duration": 0.4
},
"push": {
"particles_nb": 4
},
"remove": {
"particles_nb": 2
}
}
},
"retina_detect": true
});
JS Code Copied!
Edit & Get Code
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet">
<div class="input-container">
<i class="fas fa-user"></i>
<input type="text" placeholder="Enter your email" id="inputEmail">
<button class="clear-btn" onclick="clearInput()">×</button>
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background: linear-gradient(135deg, rgba(58, 123, 213, 0.4), rgba(29, 161, 242, 0.4));
font-family: 'Arial', sans-serif;
}
.input-container {
position: relative;
width: 300px;
height: 60px;
background: rgba(255, 255, 255, 0.2);
border-radius: 15px;
backdrop-filter: blur(10px);
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
padding: 10px 15px;
display: flex;
align-items: center;
transition: all 0.3s ease;
}
.input-container i {
color: #fff;
font-size: 20px;
margin-right: 10px;
}
.input-container input {
width: 100%;
padding: 10px;
background: transparent;
border: none;
color: #fff;
font-size: 16px;
outline: none;
transition: all 0.3s ease;
}
.input-container input::placeholder {
color: #aaa;
font-size: 16px;
transition: transform 0.3s ease, opacity 0.3s ease;
}
.input-container input:focus::placeholder {
transform: translateY(-20px);
opacity: 0;
}
.input-container input:focus {
border-bottom: 2px solid #1da1f2;
box-shadow: 0 4px 12px rgba(29, 161, 242, 0.6);
}
.input-container .clear-btn {
position: absolute;
right: 15px;
background: none;
border: none;
color: #fff;
font-size: 18px;
cursor: pointer;
opacity: 0;
transition: opacity 0.3s ease;
}
.input-container input:not(:placeholder-shown)~.clear-btn {
opacity: 1;
}
.input-container .clear-btn:hover {
color: #ff4b5c;
}
CSS Code Copied!
function clearInput() {
const input = document.getElementById('inputEmail');
input.value = '';
input.focus();
}
JS Code Copied!
Edit & Get Code
<div class="input-group">
<input type="text" placeholder="" id="name">
<label for="name">Enter your name</label>
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background: #121212;
font-family: Arial, sans-serif;
}
.input-group {
position: relative;
width: 320px;
margin: 20px;
}
.input-group input {
width: 100%;
padding: 15px;
border: 2px solid #333;
border-radius: 12px;
background: #222;
color: #fff;
font-size: 16px;
outline: none;
transition: all 0.3s ease;
}
.input-group input::placeholder {
color: #aaa;
transition: color 0.3s ease;
}
.input-group input:focus {
border-color: #00d4ff;
box-shadow: 0 0 10px rgba(0, 212, 255, 0.7);
}
.input-group input:hover {
border-color: #ffb6c1;
box-shadow: 0 0 8px rgba(255, 182, 193, 0.5);
}
.input-group input:focus::placeholder {
color: transparent;
}
.input-group label {
position: absolute;
top: -10px;
left: 15px;
font-size: 14px;
color: #aaa;
transition: all 0.3s ease;
pointer-events: none;
}
.input-group input:focus+label,
.input-group input:not(:placeholder-shown)+label {
top: -20px;
font-size: 12px;
color: #00d4ff;
}
CSS Code Copied!
<!-- NO JS CODE HERE -->
JS Code Copied!
Edit & Get Code
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet">
<div class="input-container">
<input type="text" placeholder="Type something" id="input">
<i class="icon fas fa-pencil-alt"></i>
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background: #f0f2f5;
font-family: Arial, sans-serif;
}
.input-container {
position: relative;
width: 250px;
height: 50px;
}
.input-container input {
width: 100%;
height: 100%;
padding: 0 20px 0 50px;
border-radius: 25px;
font-size: 18px;
outline: none;
border: 2px solid #ddd;
transition: all 0.3s ease;
}
.input-container input:focus {
border: 2px solid #4caf50;
box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}
.input-container input::placeholder {
color: #aaa;
font-size: 16px;
}
.input-container .icon {
position: absolute;
top: 50%;
left: 15px;
transform: translateY(-50%);
font-size: 20px;
color: #aaa;
transition: all 0.3s ease;
}
.input-container input:focus+.icon {
color: #4caf50;
}
.input-container input:focus::placeholder {
color: transparent;
}
CSS Code Copied!
<!-- NO JS CODE HERE -->
JS Code Copied!
Edit & Get Code
<div class="input-wrapper">
<input type="text" placeholder="Enter your email" />
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background: #f9f9f9;
font-family: Arial, sans-serif;
}
.input-wrapper {
width: 320px;
height: 60px;
border: 2px solid #ccc;
border-radius: 12px;
padding: 5px;
transition: border 0.4s ease;
}
.input-wrapper input {
width: 100%;
height: 100%;
padding: 15px;
border: none;
border-radius: 12px;
background-color: #fff;
font-size: 16px;
outline: none;
color: #333;
}
.input-wrapper input:focus {
border-color: #007bff;
}
.input-wrapper input::placeholder {
color: #aaa;
}
.input-wrapper input:focus::placeholder {
color: transparent;
}
.input-wrapper input:focus {
transition: all 0.4s ease;
box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
}
.input-wrapper input:focus {
border: 2px solid #007bff;
color: rgb(68, 0, 255);
font-weight: bold;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
CSS Code Copied!
<!-- NO JS CODE HERE -->
JS Code Copied!
Edit & Get Code
<div class="input-wrapper">
<input type="text" placeholder=" " id="input">
<label for="input">Your Username</label>
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background: #f7f7f7;
font-family: Arial, sans-serif;
}
.input-wrapper {
position: relative;
width: 300px;
margin: 20px;
}
.input-wrapper input {
width: 100%;
padding: 20px;
border: 2px solid transparent;
border-radius: 10px;
background-color: #fff;
color: #333;
font-size: 16px;
transition: all 0.3s ease;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.input-wrapper input:focus {
border-color: #2196f3;
box-shadow: 0 6px 12px rgba(33, 150, 243, 0.5);
}
.input-wrapper label {
position: absolute;
left: 20px;
top: 15px;
font-size: 16px;
color: #aaa;
pointer-events: none;
transition: 0.3s ease;
}
.input-wrapper input:focus+label,
.input-wrapper input:not(:placeholder-shown)+label {
top: 70px;
left: 0px;
font-size: 24px;
font-weight: bold;
color: #2196f3;
animation: changeColor 1.5s ease-in-out infinite;
}
@keyframes changeColor {
0% {
color: #f55f1a;
}
50% {
color: #cf09c8;
}
90% {
color: #360de9;
}
100% {
color: #f55f1a;
}
}
CSS Code Copied!
<!-- NO JS CODE HERE -->
JS Code Copied!
Edit & Get Code
<div class="input-box">
<input type="text" placeholder="Your Email" />
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background: #121212;
font-family: 'Arial', sans-serif;
}
.input-box {
width: 300px;
padding: 10px;
border-radius: 15px;
border: 2px solid transparent;
background: #333;
position: relative;
transition: all 0.3s ease;
}
.input-box input {
width: 100%;
padding: 15px;
font-size: 18px;
border-radius: 10px;
outline: none;
background: #222;
color: #fff;
border: 2px solid #444;
}
.input-box input:focus {
border-color: #00ff9d;
box-shadow: 0 0 10px rgba(0, 255, 157, 0.6);
}
.input-box input::placeholder {
color: #aaa;
transition: color 0.3s ease;
}
.input-box input:focus::placeholder {
color: transparent;
}
.input-box input:focus {
transition: all 0.3s ease;
border-color: #00ff9d;
}
CSS Code Copied!
<!-- NO JS CODE HERE -->
JS Code Copied!
Edit & Get Code
<div class="input-wrapper">
<input type="text" placeholder=" " id="input">
<label for="input">Enter Your Password</label>
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background: #e0e0e0;
font-family: Arial, sans-serif;
}
.input-wrapper {
width: 22rem;
height: 5rem;
position: relative;
box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.1), -8px -8px 20px rgba(255, 255, 255, 0.7);
border-radius: 1.5rem;
padding: 0.5rem;
background-color: #e0e0e0;
transition: box-shadow 0.3s ease;
}
.input-wrapper input {
width: 100%;
padding: 2rem 1rem;
border: none;
background-color: #e0e0e0;
color: #333;
font-size: 1.2rem;
outline: none;
border-radius: 1.5rem;
transition: box-shadow 0.3s ease;
}
.input-wrapper input:focus {
box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}
.input-wrapper label {
position: absolute;
top: 50%;
left: 1rem;
font-size: 1rem;
color: #aaa;
transform: translateY(-50%);
pointer-events: none;
transition: all 0.3s ease;
}
.input-wrapper input:focus+label,
.input-wrapper input:not(:placeholder-shown)+label {
top: -0.8rem;
left: 1.2rem;
font-size: 0.9rem;
color: #4caf50;
}
CSS Code Copied!
<!-- NO JS CODE HERE -->
JS Code Copied!
Edit & Get Code
<div class="input-wrapper">
<input type="text" placeholder=" " id="input">
<label for="input">Username</label>
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f5f5f5;
font-family: 'Arial', sans-serif;
}
.input-wrapper {
width: 18rem;
height: 2rem;
position: relative;
padding: 1rem;
background: #e0e0e0;
border-radius: 1.2rem;
box-shadow: 6px 6px 12px rgba(0, 0, 0, 0.1), -6px -6px 12px rgba(255, 255, 255, 0.7);
transition: all 0.4s ease;
}
.input-wrapper input {
width: 100%;
height: 100%;
padding: 2rem 1.5rem 1rem 3rem;
font-size: 1.4rem;
border: 2px solid #ccc;
border-radius: 1rem;
outline: none;
background-color: #fff;
transition: all 0.3s ease;
}
.input-wrapper input:focus {
border-color: #007bff;
background-color: rgba(0, 123, 255, 0.1);
box-shadow: 0 0 12px rgba(0, 123, 255, 0.6);
}
.input-wrapper input:focus+label {
transform: translateY(-1.5rem) scale(0.9);
color: #007bff;
}
.input-wrapper label {
position: absolute;
top: 50%;
left: 3rem;
font-size: 1.2rem;
color: #aaa;
transform: translateY(-50%) scale(1);
transition: all 0.3s ease;
}
.input-wrapper input:focus+label::before {
content: "
";
position: absolute;
left: -2rem;
top: 50%;
font-size: 1.6rem;
color: #007bff;
transform: translateY(-50%);
opacity: 1;
transition: opacity 0.3s ease;
}
.input-wrapper input::placeholder {
color: transparent;
}
.input-wrapper input:focus::placeholder {
color: transparent;
}
/* Icon inside input */
.input-wrapper input+label::before {
content: "
";
position: absolute;
left: -1.7rem;
top: 50%;
font-size: 1.4rem;
color: #aaa;
transform: translateY(-50%);
transition: all 0.3s ease;
}
CSS Code Copied!
<!-- NO JS CODE HERE -->
JS Code Copied!
Edit & Get Code
<div class="input-container">
<input type="text" id="input" required>
<label for="input" class="label">Username</label>
<div class="underline"></div>
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #121212;
margin: 0;
}
.input-container {
position: relative;
width: 250px;
font-family: 'Arial', sans-serif;
}
.input-container input {
font-size: 18px;
width: 100%;
border: none;
border-bottom: 2px solid transparent;
padding: 8px 0;
background-color: transparent;
outline: none;
color: white;
transition: all 0.3s ease;
}
.input-container input:focus {
border-bottom: 2px solid #00ff99;
box-shadow: 0 0 10px rgba(0, 255, 153, 0.5);
}
.input-container .label {
position: absolute;
top: 50%;
left: 0;
color: #aaa;
transform: translateY(-50%);
font-size: 18px;
transition: all 0.3s ease;
}
.input-container input:focus~.label,
.input-container input:valid~.label {
top: -10px;
font-size: 14px;
color: #00ff99;
}
.input-container .underline {
position: absolute;
bottom: 0;
left: 0;
height: 2px;
width: 100%;
background-color: #00ff99;
transform: scaleX(0);
transition: all 0.3s ease;
}
.input-container input:focus~.underline,
.input-container input:valid~.underline {
transform: scaleX(1);
}
CSS Code Copied!
<!-- No JS code needed for this Element -->
JS Code Copied!
Edit & Get Code
<div class="input-container">
<input type="text" id="input" required>
<label for="input" class="label">Full Name</label>
<div class="underline"></div>
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background: #f0f0f0;
}
.input-container {
position: relative;
width: 300px;
}
.input-container input {
font-size: 18px;
width: 100%;
border: none;
padding: 10px;
background: linear-gradient(90deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
border-radius: 10px;
outline: none;
transition: all 0.3s ease;
}
.input-container input:focus {
background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.4));
box-shadow: 0 0 8px rgba(0, 123, 255, 0.7);
}
.input-container .label {
position: absolute;
top: 10px;
left: 10px;
font-size: 16px;
color: #666;
transition: all 0.3s ease;
}
.input-container input:focus~.label,
.input-container input:valid~.label {
top: -25px;
left: 0;
font-size: 18px;
font-weight: bold;
color: #007bff;
}
.input-container .underline {
position: absolute;
bottom: 0;
left: 0;
height: 2px;
width: 100%;
background-color: #007bff;
transform: scaleX(0);
transition: all 0.3s ease;
}
.input-container input:focus~.underline,
.input-container input:valid~.underline {
transform: scaleX(1);
}
CSS Code Copied!
<!-- No JS code needed for this Element -->
JS Code Copied!
Edit & Get Code
<div class="input-container">
<input type="text" id="input" required>
<label for="input" class="label">Email Address</label>
<div class="underline"></div>
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #000000;
}
.input-container {
position: relative;
width: 250px;
font-family: 'Arial', sans-serif;
}
.input-container input {
font-size: 18px;
width: 100%;
border: none;
padding: 12px 16px;
background-color: #fff;
border-radius: 5px;
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
outline: none;
transition: all 0.3s ease;
}
.input-container input:focus {
transform: translateY(-5px);
box-shadow: 0 0 15px rgba(235, 21, 131, 0.7);
border: 4px dotted #F43676;
border-radius: 1px;
}
.input-container .label {
position: absolute;
top: 50%;
left: 16px;
color: #aaa;
transform: translateY(-50%);
font-size: 16px;
transition: all 0.3s ease;
}
.input-container input:focus~.label,
.input-container input:valid~.label {
top: -19px;
left: 4.5rem;
font-size: 19px;
font-weight: bold;
color: #f43676;
}
.input-container .underline {
position: absolute;
bottom: 0;
left: 0;
height: 4px;
width: 100%;
background-color: #f43676;
transform: scaleX(0);
transition: all 0.3s ease;
}
.input-container input:focus~.underline,
.input-container input:valid~.underline {
transform: scaleX(1);
}
CSS Code Copied!
<!-- No JS code needed for this Element -->
JS Code Copied!
Edit & Get Code
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
<div class="input-container">
<input type="text" id="input" required>
<label for="input" class="label">Username</label>
<div class="underline"></div>
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background: linear-gradient(135deg, #ffffff, #50e3c2, #ffffff);
font-family: 'Arial', sans-serif;
}
.input-container {
position: relative;
width: 320px;
}
.input-container input {
font-size: 18px;
width: 100%;
padding: 14px 18px;
background-color: rgba(255, 255, 255, 0.15);
border: 2px solid transparent;
border-radius: 12px;
outline: none;
color: #000000;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
transition: all 0.4s ease-in-out;
}
.input-container input:hover {
transform: scale(1.02);
box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}
.input-container input:focus {
background-color: rgba(255, 255, 255, 0.25);
border-image: linear-gradient(45deg, #ff5f6d, #ffc371);
border-image-slice: 1;
box-shadow: 0 0 10px rgba(255, 95, 109, 0.8), 0 0 20px rgba(255, 195, 113, 0.6);
}
.input-container .label {
position: absolute;
top: 50%;
left: 18px;
color: #000000b3;
font-size: 18px;
transform: translateY(-50%);
transition: all 0.4s ease;
}
/* Icon effect */
.input-container .label::before {
content: '\f007';
/* Unicode for user icon (FontAwesome) */
font-family: 'Font Awesome 5 Free';
/* Ensure FontAwesome is loaded */
font-weight: 900;
position: absolute;
top: -3px;
left: -25px;
font-size: 24px;
color: rgba(255, 113, 113, 0);
opacity: 0;
transition: all 0.4s ease;
}
.input-container input:focus~.label,
.input-container input:valid~.label {
top: -14px;
font-size: 24px;
color: #ff7171;
font-weight: bold;
}
.input-container input:focus~.label::before,
.input-container input:valid~.label::before {
color: rgba(255, 113, 113, 1);
opacity: 1;
transform: translateX(0);
}
.input-container .underline {
position: absolute;
bottom: 0;
left: 0;
height: 2px;
width: 0;
background: linear-gradient(90deg, #ff5f6d, #ffc371);
animation: glow 1.5s infinite alternate;
transition: all 0.4s ease;
}
.input-container input:focus~.underline {
width: 100%;
}
@keyframes glow {
0% {
box-shadow: 0 0 8px rgba(255, 95, 109, 0.5);
}
100% {
box-shadow: 0 0 15px rgba(255, 195, 113, 0.8);
}
}
CSS Code Copied!
<!-- No JS code needed for this Element -->
JS Code Copied!
Edit & Get Code
<div class="input-container">
<input type="text" id="input" required placeholder=" ">
<label for="input" class="label">Search</label>
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background: linear-gradient(135deg, #1e1e2f, #3a3a50);
font-family: 'Arial', sans-serif;
overflow: hidden;
}
.input-container {
position: relative;
width: 320px;
padding: 20px;
}
.input-container input {
font-size: 18px;
width: 100%;
padding: 14px 18px;
border: none;
border-radius: 12px;
background: linear-gradient(45deg, #ff7f50, #ffdb58, #4a90e2);
color: #ffffff;
text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
outline: none;
transition: all 0.3s ease-in-out;
animation: idle-gradient 6s infinite linear;
}
/* Gradient animation when idle */
@keyframes idle-gradient {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
/* Disco hover animation */
.input-container input:hover {
animation: disco 0.5s infinite ease-in-out, hover-gradient 2s infinite linear;
box-shadow: 0 0 15px rgba(255, 255, 255, 0.8), 0 0 30px rgba(255, 0, 255, 0.7);
}
@keyframes disco {
0%,
100% {
transform: translateY(0);
}
50% {
transform: translateY(-5px);
}
}
@keyframes hover-gradient {
0% {
background: linear-gradient(45deg, #ff0000, #ff7f50, #ffdb58);
}
25% {
background: linear-gradient(45deg, #4a90e2, #50e3c2, #ff00ff);
}
50% {
background: linear-gradient(45deg, #ffdb58, #96d896, #4a90e2);
}
75% {
background: linear-gradient(45deg, #ff00ff, #00ffff, #ff7f50);
}
100% {
background: linear-gradient(45deg, #ff0000, #ff7f50, #ffdb58);
}
}
.input-container input:focus {
border: none;
outline: none;
animation: focus-glow 1.5s infinite alternate;
}
/* Glow effect on focus */
@keyframes focus-glow {
0% {
box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
100% {
box-shadow: 0 0 25px rgba(255, 0, 255, 0.9);
}
}
.input-container .label {
position: absolute;
top: 50%;
left: 38px;
color: #000000b3;
font-size: 18px;
font-weight: bold;
transform: translateY(-50%);
transition: all 0.4s ease;
}
.input-container input:focus~.label,
.input-container input:valid~.label {
top: -12px;
font-size: 14px;
color: #ffdb58;
animation: disco 0.5s infinite ease-in-out;
}
CSS Code Copied!
<!-- No JS code needed for this Element -->
JS Code Copied!
Edit & Get Code
<div class="input-container">
<input type="text" id="input" required>
<label for="input" class="label">Your Email</label>
<div class="underline"></div>
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background: #e0e0e0;
}
.input-container {
position: relative;
width: 300px;
font-family: 'Arial', sans-serif;
}
.input-container input {
font-size: 18px;
width: 100%;
padding: 14px 16px;
background-color: #e0e0e0;
border: none;
border-radius: 12px;
outline: none;
color: #cb0e76;
box-shadow: 8px 8px 15px rgba(0, 0, 0, 0.1), -8px -8px 15px rgba(255, 255, 255, 0.7);
transition: all 0.3s ease;
}
.input-container input:focus {
box-shadow: 0 0 10px rgba(255, 0, 200, 0.6), 8px 8px 15px rgba(0, 0, 0, 0.1), -8px -8px 15px rgba(255, 255, 255, 0.7);
background-color: #ffffff;
}
.input-container .label {
position: absolute;
top: 50%;
left: 16px;
color: #ccc;
font-size: 18px;
transform: translateY(-50%);
transition: all 0.3s ease;
}
.input-container input:focus~.label,
.input-container input:valid~.label {
left: -55px;
font-size: 14px;
font-weight: 900;
color: #ff0090;
transform: rotate(270deg);
}
.input-container .underline {
position: absolute;
top: 0;
left: 5px;
height: 5px;
width: 0;
background-color: #ff0095;
transition: all 0.3s ease;
}
.input-container input:focus~.underline,
.input-container input:valid~.underline {
width: 95%;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="input-container">
<input type="text" id="input" required>
<label for="input" class="label">Enter Email</label>
<div class="topline"></div>
<div class="underline"></div>
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background: #1e1e1e;
}
.input-container {
position: relative;
width: 320px;
font-family: 'Arial', sans-serif;
}
.input-container input {
font-size: 18px;
padding: 15px 12px;
width: 100%;
background: transparent;
border: 2px solid #0e76a8;
border-radius: 20px;
outline: none;
color: #da5512;
transition: all 0.4s ease;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}
.input-container input:focus {
border-color: #ff6f61;
box-shadow: 0 0 10px rgba(255, 111, 97, 0.6);
}
.input-container .label {
position: absolute;
top: 16px;
left: 12px;
color: #0e76a8;
font-size: 18px;
transition: all 0.4s ease;
pointer-events: none;
}
.input-container input:focus~.label,
.input-container input:valid~.label {
top: -20px;
font-size: 14px;
color: #ff6f61;
}
.input-container .topline {
position: absolute;
content: "";
background-color: #ff6f61;
width: 0%;
height: 8px;
top: 0;
left: 1rem;
transition: all 0.4s ease;
}
.input-container input:focus~.topline {
width: 90%;
transition: all 0.6s ease;
}
.input-container .underline {
position: absolute;
content: "";
background-color: #ff6f61;
width: 0%;
height: 8px;
bottom: 0;
left: 1rem;
transition: all 0.4s ease;
}
.input-container input:focus~.underline {
width: 90%;
transition: all 0.6s ease;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="input-container">
<input type="text" id="input" required>
<label for="input" class="label">Enter Your Name</label>
<div class="topline"></div>
<div class="underline"></div>
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background: #000000;
}
.input-container {
position: relative;
width: 300px;
font-family: 'Arial', sans-serif;
}
.input-container input {
padding: 10px;
height: 60px;
border: 2px solid #1e90ff;
/* Changed color */
border-top: none;
border-bottom: none;
font-size: 16px;
background: transparent;
outline: none;
color: #38caaf;
transition: all 0.5s;
box-shadow: 7px 7px 0px 0px #1e90ff;
/* Changed shadow color */
}
.input-container input:focus {
box-shadow: none;
transition: all 0.5s;
}
.label {
position: absolute;
top: 10px;
left: 10px;
color: #1e90ff;
/* Changed color */
transition: all 0.5s;
transform: scale(0);
z-index: -1;
}
.input-container .topline {
position: absolute;
content: "";
background-color: #1e90ff;
/* Changed color */
width: 0%;
height: 4px;
right: 27%;
top: 0;
transition: all 0.5s;
}
.input-container input[type="text"]:focus~.topline {
width: 28%;
transition: all 0.5s;
}
.input-container .underline {
position: absolute;
content: "";
background-color: #1e90ff;
/* Changed color */
width: 0%;
height: 4px;
right: 27%;
bottom: 0;
transition: all 0.5s;
}
.input-container input[type="text"]:focus~.underline {
width: 72%;
transition: all 0.5s;
}
.input-container input[type="text"]:focus~.label {
top: -10px;
transform: scale(1);
transition: all 0.5s;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="input-container">
<input type="text" id="input" placeholder=" " required>
<label for="input">Enter Your Name</label>
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background: #121212;
/* Dark background for contrast */
font-family: 'Arial', sans-serif;
}
.input-container {
position: relative;
width: 18rem;
}
.input-container input {
width: 100%;
height: 50px;
border: 3px solid transparent;
border-radius: 8px;
background: linear-gradient(#121212, #121212) padding-box,
linear-gradient(90deg, #ff007f, #007fff, #00ff7f) border-box;
color: #fff;
padding: 0 15px;
font-size: 18px;
outline: none;
transition: all 0.4s ease-in-out;
}
.input-container input:focus {
background: linear-gradient(#121212, #121212) padding-box,
linear-gradient(90deg, #ff007f, #007fff, #00ff7f, #ff007f) border-box;
box-shadow: 0px 0px 15px 3px rgba(255, 0, 127, 0.6);
}
.input-container label {
position: absolute;
top: 50%;
left: 15px;
transform: translateY(-50%);
color: #aaa;
font-size: 18px;
pointer-events: none;
transition: all 0.3s ease;
}
.input-container input:focus~label,
.input-container input:not(:placeholder-shown)~label {
top: -10px;
left: 15px;
font-size: 14px;
color: #00ff7f;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<input type="checkbox" id="popup-toggle">
<!-- Button to trigger the popup -->
<label for="popup-toggle" class="search-trigger">Open Search</label>
<!-- Popup Container -->
<div class="popup-container">
<div class="popup-box">
<button class="close-btn" for="popup-toggle" onclick="document.getElementById('popup-toggle').checked = false;">
</button>
<input type="text" placeholder="Type your query...">
</div>
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #1e3c72, #2a5298);
font-family: Arial, sans-serif;
overflow: hidden;
}
/* The initial button that triggers the popup */
.search-trigger {
padding: 15px 30px;
font-size: 18px;
color: white;
border: none;
border-radius: 5px;
background: linear-gradient(45deg, #ff7f50, #ff4500);
cursor: pointer;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
transition: all 0.3s ease-in-out;
}
.search-trigger:hover {
box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.3);
transform: scale(1.05);
}
/* The popup container (hidden by default) */
.popup-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.8);
display: flex;
justify-content: center;
align-items: center;
opacity: 0;
visibility: hidden;
transition: all 0.4s ease-in-out;
}
/* Make the popup visible when checked */
#popup-toggle:checked~.popup-container {
opacity: 1;
visibility: visible;
}
/* Popup box */
.popup-box {
width: 60%;
max-width: 600px;
background: rgb(0, 0, 0);
border-radius: 10px;
padding: 20px;
text-align: center;
position: relative;
box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.5);
}
.popup-box input[type="text"] {
width: 80%;
font-size: 18px;
padding: 10px;
border: 2px solid #d70073;
border-radius: 5px;
outline: none;
transition: all 0.3s ease;
}
.popup-box input[type="text"]:focus {
border: 5px dotted #a1006b;
box-shadow: 0px 0px 8px rgba(0, 120, 215, 0.6);
}
.close-btn {
position: absolute;
top: 10px;
right: 10px;
background: none;
border: none;
font-size: 18px;
color: #ff0000;
cursor: pointer;
transition: color 0.3s;
}
.close-btn:hover {
color: red;
}
/* Hidden toggle checkbox */
#popup-toggle {
display: none;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="input-container">
<input type="text" placeholder="Enter text...">
<div class="border-animation">
<div class="side left"></div>
<div class="side right"></div>
</div>
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #2d2c2c, #040404);
font-family: Arial, sans-serif;
}
.input-container {
position: relative;
width: 300px;
}
input {
width: 100%;
padding: 12px 16px;
font-size: 16px;
color: #ffffff;
background: transparent;
border: none;
outline: none;
position: relative;
z-index: 1;
}
input::placeholder {
color: #cccccc;
}
.border-animation {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
}
.border-animation::before,
.border-animation::after,
.border-animation .side {
content: '';
position: absolute;
background: linear-gradient(90deg, #ef233c, #f5b700);
transition: all 0.5s ease-in-out;
}
/* Top and bottom borders */
.border-animation::before {
height: 2px;
width: 0;
top: 0;
left: 0;
}
.border-animation::after {
height: 2px;
width: 0;
bottom: 0;
right: 0;
}
/* Left and right borders */
.border-animation .side {
width: 2px;
height: 0;
}
.border-animation .left {
left: 0;
top: 0;
}
.border-animation .right {
right: 0;
bottom: 0;
}
/* On focus, animate the borders */
input:focus~.border-animation::before,
input:focus~.border-animation::after {
width: 100%;
}
input:focus~.border-animation .side {
height: 100%;
}
input:focus~.border-animation .left {
transition-delay: 0.25s;
}
input:focus~.border-animation .right {
transition-delay: 0.25s;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="input-container">
<input type="text" placeholder="Enter text...">
<div class="border-animation">
<div class="side left"></div>
<div class="side right"></div>
</div>
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #3d3e50, #7383a0);
font-family: Arial, sans-serif;
}
.input-container {
position: relative;
width: 18rem;
}
input {
width: 100%;
padding: 12px 16px;
font-size: 16px;
color: #ffffff;
background: transparent;
outline: none;
position: relative;
z-index: 1;
}
input::placeholder {
color: #cccccc;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="input-container">
<input type="text" placeholder="Type something...">
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(to right, #0f2027, #203a43, #2c5364);
font-family: Arial, sans-serif;
}
.input-container {
position: relative;
width: 19rem;
}
input {
width: 100%;
padding: 12px 16px;
font-size: 16px;
color: #ffffff;
background: transparent;
border: 2px solid #ff0066;
border-radius: 5px;
outline: none;
box-shadow: 0 0 15px #ff0066;
transition: box-shadow 0.4s ease-in-out, border-color 0.4s ease-in-out;
}
input:focus {
border-color: #00ffcc;
box-shadow: 0 0 25px #00ffcc, 0 0 50px #00ffcc;
}
input::placeholder {
color: #aaaaaa;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="input-container">
<input type="text" placeholder="Click to expand...">
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #000000, #1a1e24);
font-family: Arial, sans-serif;
}
.input-container {
position: relative;
width: 300px;
}
.input-container input {
position: relative;
width: 50%;
padding: 12px 16px;
font-size: 16px;
color: #50f77c;
background: transparent;
border: 2px solid #13ff81;
border-radius: 8px;
outline: none;
transition: height 0.5s ease-in-out, width 0.5s ease-in-out, padding 0.5s ease-in-out;
height: 0px;
}
.input-container input:focus {
height: 15px;
width: 100%;
padding: 20px;
box-shadow: 0 0px 10px 10px rgb(53, 245, 0.5);
}
.input-container input::placeholder {
color: #24f7a6;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="input-container">
<input type="text" placeholder="Tap to start typing...">
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: #20232a;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.input-container {
position: relative;
width: 250px;
}
.input-container input {
width: 100%;
padding: 10px 16px;
font-size: 16px;
color: #d4e157;
background: transparent;
border: 2px solid #8e24aa;
border-radius: 6px;
outline: none;
transition: width 0.5s ease, padding 0.4s ease, border 0.5s ease;
box-shadow: 0 0 10px rgba(142, 36, 170, 0.5);
}
.input-container input:focus {
width: 100%;
padding: 20px;
border-color: #ff4081;
box-shadow: 0 0 15px rgba(255, 64, 129, 0.8);
}
.input-container input::placeholder {
color: #c1c1c1;
font-style: italic;
}
.input-container input:focus::placeholder {
color: #ff80ab;
font-style: normal;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="input-container">
<input type="text" placeholder="Enter your text...">
<div class="underline"></div>
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: #0a0a0a;
font-family: 'Arial', sans-serif;
}
.input-container {
position: relative;
width: 280px;
height: 50px;
}
.input-container input {
width: 100%;
height: 100%;
padding: 15px 20px;
font-size: 16px;
color: #e0e0e0;
background: transparent;
border: none;
outline: none;
position: relative;
z-index: 2;
transition: all 0.4s ease;
}
.input-container input::placeholder {
color: #7f7f7f;
transition: all 0.4s ease;
}
.input-container input:focus::placeholder {
color: #50e3c2;
}
.input-container .underline {
position: absolute;
bottom: -10px;
left: 20px;
width: 0%;
height: 3px;
background: linear-gradient(135deg, #ff4081, #50e3c2);
transition: width 0.4s ease;
z-index: 1;
}
.input-container input:focus+.underline {
width: 100%;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="input-container">
<input type="text" placeholder="Type here...">
<div class="glowing-border"></div>
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: #1c1c1c;
font-family: 'Arial', sans-serif;
}
.input-container {
position: relative;
width: 280px;
height: 50px;
}
.input-container input {
width: 100%;
height: 100%;
padding: 12px 18px;
font-size: 16px;
color: #fff;
background: #2d2d2d;
border: 2px solid transparent;
border-radius: 8px;
outline: none;
position: relative;
z-index: 2;
transition: all 0.4s ease;
}
.input-container input::placeholder {
color: #999;
transition: all 0.4s ease;
}
.input-container input:focus::placeholder {
color: #1e90ff;
}
.input-container .glowing-border {
position: absolute;
top: -1px;
left: 0;
width: 0%;
height: 100%;
border: 2px solid #1e90ff;
border-radius: 8px;
box-shadow: 0 0 10px rgba(30, 144, 255, 0.8);
z-index: 1;
transition: width 0.4s ease;
}
.input-container input:focus+.glowing-border {
width: 100%;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="input-container">
<input type="text" placeholder="Type something...">
<div class="ripple"></div>
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: #222;
font-family: 'Arial', sans-serif;
}
.input-container {
position: relative;
width: 300px;
height: 60px;
display: flex;
justify-content: center;
align-items: center;
background: transparent;
}
.input-container input {
width: 60%;
height: 40px;
padding: 10px 15px;
font-size: 16px;
color: #fff;
background: #333;
border: 2px solid #555;
border-radius: 8px;
outline: none;
transition: width 0.5s ease-in-out, padding 0.5s ease-in-out;
position: relative;
}
.input-container input::placeholder {
color: #aaa;
transition: color 0.4s ease;
}
.input-container input:focus::placeholder {
color: #1e90ff;
}
.input-container input:focus {
width: 100%;
padding: 2.3rem;
border-color: #1e90ff;
}
.input-container .ripple {
position: absolute;
width: 0;
height: 0;
border-radius: 10px;
background: rgba(30, 144, 255, 0.4);
}
.input-container input:focus+.ripple {
width: 100%;
height: 100%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="input-container">
<input type="text" placeholder="Enter your text here...">
<div class="pulse"></div>
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: radial-gradient(circle, #0f2027, #203a43, #2c5364);
font-family: 'Arial', sans-serif;
}
.input-container {
position: relative;
width: 300px;
display: flex;
justify-content: center;
align-items: center;
}
.input-container input {
width: 50%;
height: 40px;
padding: 10px 15px;
font-size: 16px;
color: #0ef9e2;
background: transparent;
border: 2px solid #0ef9e2;
border-radius: 12px;
outline: none;
box-shadow: 0 0 10px rgba(14, 249, 226, 0.8);
transition: all 0.5s ease-in-out;
}
.input-container input::placeholder {
color: #71f7e9;
opacity: 0.7;
}
.input-container input:focus {
width: 100%;
height: 50px;
border-color: #08d9d6;
box-shadow: 0 0 20px rgba(8, 217, 214, 0.8), 0 0 50px rgba(8, 217, 214, 0.4);
}
.input-container .pulse {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border: 2px solid rgba(14, 249, 226, 0.6);
border-radius: 12px;
animation: pulse-animation 2s infinite;
pointer-events: none;
}
@keyframes pulse-animation {
0% {
transform: scale(1);
opacity: 1;
}
50% {
transform: scale(1.1);
opacity: 0.6;
}
100% {
transform: scale(1);
opacity: 1;
}
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="input-container">
<input type="text" placeholder="Type something...">
<div class="border-animation"></div>
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #1a1a1a, #333);
font-family: 'Arial', sans-serif;
}
.input-container {
position: relative;
width: 300px;
}
.input-container input {
width: 60%;
height: 40px;
padding: 10px 15px;
font-size: 16px;
color: #fff;
background: transparent;
border: 2px solid #555;
border-radius: 8px;
outline: none;
transition: width 0.5s ease, height 0.5s ease, border-color 0.3s ease;
}
.input-container input:focus {
width: 100%;
height: 50px;
border-color: #4caf50;
}
.input-container .border-animation {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 2px solid transparent;
border-radius: 8px;
pointer-events: none;
}
.input-container input:focus+.border-animation {
border-color: #4caf50;
animation: rotate-border 2s forwards;
}
@keyframes rotate-border {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="input-container">
<input type="text" placeholder="Enter your text here...">
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: radial-gradient(circle, #0d0d0d, #1c1c1c);
font-family: 'Arial', sans-serif;
}
.input-container {
position: relative;
width: 300px;
}
.input-container input {
width: 100%;
padding: 12px 16px;
font-size: 16px;
color: #fff;
background: transparent;
border: 2px solid #444;
border-radius: 8px;
outline: none;
transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.input-container input:focus {
border-color: #3cffd0;
box-shadow: 0 0 10px #3cffd0, 0 0 20px #3cffd0;
}
.input-container::before {
content: '';
position: absolute;
top: -5px;
left: -5px;
width: calc(100% + 10px);
height: calc(100% + 10px);
border-radius: 10px;
background: linear-gradient(45deg, #3cffd0, #0066ff, #ff0099, #3cffd0);
filter: blur(8px);
animation: pulse 2s infinite;
opacity: 0.5;
z-index: -1;
}
@keyframes pulse {
0%,
100% {
transform: scale(1);
opacity: 0.5;
}
50% {
transform: scale(1.1);
opacity: 0.8;
}
}
.input-container input::placeholder {
color: #888;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="input-container">
<input type="text" placeholder="Type...">
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #101820, #2a2a2a);
font-family: 'Arial', sans-serif;
}
.input-container {
position: relative;
width: 300px;
perspective: 1000px;
}
.input-container input {
width: 100%;
padding: 14px 16px;
font-size: 16px;
color: #fff;
background: transparent;
border: none;
border-radius: 10px;
outline: none;
text-align: center;
transform: rotateX(10deg);
box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.input-container input:hover {
box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
}
.input-container::before {
content: '';
position: absolute;
top: -5px;
left: -5px;
width: calc(100% + 10px);
height: calc(100% + 10px);
border-radius: 12px;
background: linear-gradient(135deg, #ff00cc, #3333ff, #00ffcc);
background-size: 300% 300%;
animation: gradient-animation 3s infinite;
z-index: -1;
}
@keyframes gradient-animation {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
.input-container input::placeholder {
color: #aaa;
font-style: italic;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="input-cube-container">
<div class="input-cube front">
<input type="text" placeholder="Type here...">
</div>
<div class="input-cube back">Back</div>
<div class="input-cube left">Left</div>
<div class="input-cube right">Right</div>
<div class="input-cube top">Top</div>
<div class="input-cube bottom">Bottom</div>
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: radial-gradient(circle, #0d0d0d, #1a1a1a);
font-family: 'Arial', sans-serif;
}
.input-cube-container {
position: relative;
width: 250px;
height: 50px;
transform-style: preserve-3d;
}
.input-cube {
position: absolute;
width: 100%;
height: 100%;
background: linear-gradient(45deg, #192120, #21f383);
border-radius: 8px;
transform-origin: center;
display: flex;
justify-content: center;
align-items: center;
color: #ffffff;
text-align: center;
font-size: 16px;
transition: transform 0.3s ease;
}
.input-cube-container:hover {
cursor: pointer;
animation: rotateCube 5s forwards;
}
.input-cube.front {
transform: translateZ(25px);
}
.input-cube.back {
transform: translateZ(-25px) rotateY(180deg);
}
.input-cube.left {
transform: rotateY(-90deg) translateX(-25px);
transform-origin: left;
}
.input-cube.right {
transform: rotateY(90deg) translateX(25px);
transform-origin: right;
}
.input-cube.top {
transform: rotateX(90deg) translateY(-25px);
transform-origin: top;
}
.input-cube.bottom {
transform: rotateX(-90deg) translateY(25px);
transform-origin: bottom;
}
@keyframes rotateCube {
0% {
transform: rotateX(0deg) rotateY(0deg);
}
25% {
transform: rotateX(90deg) rotateY(0deg);
}
50% {
transform: rotateX(90deg) rotateY(90deg);
}
75% {
transform: rotateX(0deg) rotateY(90deg);
}
100% {
transform: rotateX(0deg) rotateY(0deg);
}
}
input {
width: 80%;
padding: 10px;
font-size: 14px;
border: none;
border-radius: 5px;
outline: none;
color: #000;
}
input::placeholder {
color: #666;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="input-container" onclick="expandInput(this)">
<input type="text" placeholder="Type something..." onclick="event.stopPropagation()">
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #1e1e2f, #141418);
font-family: 'Arial', sans-serif;
}
.input-container {
position: relative;
width: 60px;
height: 60px;
display: flex;
justify-content: center;
align-items: center;
background: radial-gradient(circle, #ff3d00, #ff8c00);
border-radius: 50%;
cursor: pointer;
animation: bounce 2s infinite;
transition: all 0.5s ease-in-out;
}
.input-container input {
position: absolute;
width: 0;
height: 0;
padding: 0;
border: 3px solid #ff3d00;
border-radius: 4px;
outline: none;
font-size: 16px;
background: #000000;
color: #31ff9c;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
opacity: 0;
transition: all 0.4s ease-in-out;
}
.input-container.active {
width: 300px;
height: 50px;
border-radius: 8px;
background: #000000;
animation: none;
}
.input-container.active input {
width: 100%;
height: 100%;
padding: 10px 15px;
opacity: 1;
}
.input-container input::placeholder {
color: #999999;
}
@keyframes bounce {
0%,
100% {
transform: translateY(0);
}
50% {
transform: translateY(-10px);
}
}
CSS Code Copied!
function expandInput(element) {
element.classList.add('active');
}
// Close input when clicking outside
document.addEventListener('click', function(event) {
const container = document.querySelector('.input-container');
if (!container.contains(event.target)) {
container.classList.remove('active');
}
});
JS Code Copied!
Edit & Get Code
<div class="input-container">
<input type="text" placeholder="Type here...">
<div></div>
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #000000, #2a5298, #000000);
font-family: 'Arial', sans-serif;
}
.input-container {
position: relative;
width: 280px;
}
.input-container input {
width: 100%;
padding: 12px 16px;
font-size: 16px;
border: 2px solid #ffffff;
border-radius: 8px;
outline: none;
background: transparent;
color: #ffffff;
z-index: 1;
position: relative;
}
.input-container input:focus {
border-color: #4fc3f7;
}
.input-container input::placeholder {
color: rgba(255, 255, 255, 0.7);
}
.input-container::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(0);
width: 100%;
height: 100%;
border-radius: 8px;
background: radial-gradient(circle, #4fc3f7 10%, transparent 60%);
z-index: 0;
opacity: 0.7;
transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}
.input-container input:focus+.input-container::before {
transform: translate(-50%, -50%) scale(1);
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="input-container">
<input type="text" placeholder=" " id="floating-input">
<label for="floating-input">Enter your text</label>
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #282c34, #3a3f47);
font-family: 'Arial', sans-serif;
}
.input-container {
position: relative;
width: 300px;
}
.input-container input {
width: 100%;
padding: 16px 12px 8px;
font-size: 16px;
color: #ffffff;
background: transparent;
border: 2px solid #ffffff;
border-radius: 8px;
outline: none;
position: relative;
z-index: 1;
}
.input-container input:focus {
border-color: #00bcd4;
}
.input-container input:focus~label,
.input-container input:not(:placeholder-shown)~label {
transform: translateY(-120%);
font-size: 12px;
color: #00bcd4;
}
.input-container input::placeholder {
color: transparent;
}
.input-container label {
position: absolute;
top: 16px;
left: 12px;
font-size: 16px;
color: rgba(255, 255, 255, 0.7);
pointer-events: none;
transition: all 0.3s ease;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet">
<div class="search-container">
<input type="text" placeholder="Search...">
<div class="icon"><i class="fas fa-search"></i></div>
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: #222;
font-family: 'Arial', sans-serif;
}
.search-container {
position: relative;
width: 60px;
height: 60px;
border-radius: 50%;
border: 3px solid #f43676;
cursor: pointer;
transition: all 0.3s ease;
}
.search-container:hover {
width: 300px;
border-radius: 30px;
padding-left: 10px;
}
.search-container:hover .icon {
color: #f43676;
transition: color 0.3s ease;
left: 90%;
}
.search-container input {
width: 0;
padding: 0 10px;
height: 40px;
border: none;
background: transparent;
color: #fff;
font-size: 18px;
transition: width 0.3s ease, padding 0.3s ease;
outline: none;
}
.search-container input:focus {
width: 200px;
padding: 0 20px;
color: #f43676;
}
.search-container .icon {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 24px;
color: #fff;
}
.search-container:hover input {
width: 200px;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet">
<div class="search-circle">
<input type="text" placeholder="Search...">
<div class="icon"><i class="fas fa-search"></i></div>
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: #292b2c;
font-family: 'Arial', sans-serif;
}
.search-circle {
width: 50px;
height: 50px;
border-radius: 10%;
background: #ff6347;
display: flex;
justify-content: center;
align-items: center;
position: relative;
cursor: pointer;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.search-circle input {
width: 0;
padding: 0 20px;
height: 35px;
border: none;
background: transparent;
color: #fff;
font-size: 18px;
border-radius: 20px;
outline: none;
transition: width 0.3s ease, padding 0.3s ease;
}
.search-circle input:focus {
width: 200px;
padding: 0 15px;
}
.search-circle:hover {
transform: scale(1.2);
box-shadow: 0 0 15px rgba(255, 99, 71, 0.6);
}
.search-circle .icon {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 24px;
color: #fff;
}
.search-circle:hover .icon {
display: none;
}
.search-circle input:focus+.icon {
display: none;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="search-wrapper">
<input type="text" class="search-input" placeholder="Search...">
<div class="search-icon">
</div>
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: radial-gradient(circle, #ff9966, #ff5e62);
font-family: Arial, sans-serif;
}
.search-wrapper {
display: flex;
align-items: center;
gap: 10px;
}
.search-input {
width: 250px;
padding: 12px 16px;
border: 2px solid #ffffff;
border-radius: 25px;
font-size: 16px;
outline: none;
color: #ffffff;
background: transparent;
}
.search-input::placeholder {
color: #ffffffa0;
}
.search-icon {
position: relative;
width: 40px;
height: 40px;
display: flex;
justify-content: center;
align-items: center;
border: 2px solid #ffffff;
border-radius: 50%;
cursor: pointer;
}
.search-icon:after {
content: '';
position: absolute;
width: 0;
height: 0;
border-radius: 50%;
border: 3px solid #ffffff;
animation: progress-circle 2s infinite;
}
@keyframes progress-circle {
0% {
width: 0;
height: 0;
}
50% {
width: 36px;
height: 36px;
}
100% {
width: 0;
height: 0;
}
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="search-wrapper">
<div class="search-icon" onclick="toggleSearch()">
</div>
<input type="text" class="search-input" placeholder="Type to search...">
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #000000, #242526);
font-family: Arial, sans-serif;
}
.search-wrapper {
position: relative;
display: flex;
align-items: center;
width: 50px;
height: 50px;
overflow: hidden;
border-radius: 25px;
background: #ffffff;
transition: width 0.4s ease-in-out;
}
.search-wrapper.open {
width: 300px;
border-radius: 0px;
background: #000000;
border: 3px double #eb2525;
}
.search-icon {
width: 50px;
height: 50px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
background: #eb2525;
color: #ffffff;
border-radius: 50%;
font-size: 20px;
transition: transform 0.4s ease-in-out;
}
.search-wrapper.open .search-icon {
transform: translateX(-250px);
}
.search-input {
width: 100%;
padding: 0 20px;
border: none;
outline: none;
font-size: 16px;
opacity: 0;
color: #eb2525;
background: #000000;
transition: opacity 0.4s ease-in-out;
}
.search-wrapper.open .search-input {
opacity: 1;
}
.search-input::placeholder {
color: #a1a1a1;
}
CSS Code Copied!
function initializeSearch() {
const searchWrapper = document.querySelector('.search-wrapper');
// Define toggleSearch and attach it to the window object
window.toggleSearch = function() {
searchWrapper.classList.toggle('open');
};
// Add event listener for clicks outside the search bar
document.addEventListener("click", (event) => {
if (!searchWrapper.contains(event.target)) {
searchWrapper.classList.remove('open');
}
});
}
// Initialize the search functionality
initializeSearch();
JS Code Copied!
Edit & Get Code
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet">
<div class="input-container">
<input type="text" name="text" class="input" placeholder="Search...">
<span class="icon"><i class="fas fa-search"></i></span>
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #282c34, #4b6584);
font-family: Arial, sans-serif;
}
.input-container {
width: 240px;
position: relative;
}
.icon {
position: absolute;
right: -20px;
top: 50%;
transform: translateY(-50%);
color: #ffffff;
font-size: 18px;
cursor: pointer;
transition: transform 0.2s ease-in-out, color 0.2s ease-in-out;
}
.input-container:hover .icon {
transform: translateY(-50%) scale(1.2);
color: #e74c3c;
}
.input {
width: 100%;
height: 40px;
padding: 10px 40px 10px 10px;
border: 2.5px solid #ffffff;
border-radius: 8px;
font-size: 14px;
color: #ffffff;
background: transparent;
text-transform: uppercase;
letter-spacing: 1.5px;
transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
.input:focus {
outline: none;
border-color: #e74c3c;
box-shadow: 0 0 10px #e74c3c;
}
.input::placeholder {
color: #d1d8e0;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet">
<div class="input-container">
<input type="text" name="text" class="input" placeholder="Search...">
<span class="icon"><i class="fas fa-search"></i></span>
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #010101, #1a1e23);
font-family: Arial, sans-serif;
}
.input-container {
width: 220px;
position: relative;
}
.icon {
position: absolute;
right: 10px;
top: calc(50% + 5px);
transform: translateY(calc(-50% - 5px));
}
.input {
width: 100%;
height: 40px;
padding: 10px;
transition: .2s linear;
border: 2.5px solid rgb(0, 255, 140);
font-size: 14px;
text-transform: uppercase;
letter-spacing: 2px;
}
.input:focus {
outline: none;
border: 0.5px solid rgb(15, 227, 121);
box-shadow: -5px -5px 0px rgb(40, 255, 115);
}
.input-container:hover>.icon {
animation: anim 1s linear infinite;
}
@keyframes anim {
0%,
100% {
transform: translateY(calc(-50% - 5px)) scale(1);
}
50% {
transform: translateY(calc(-50% - 5px)) scale(1.1);
}
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet">
<div class="input-container">
<input type="text" name="text" class="input" placeholder="Search...">
<span class="icon"><i class="fas fa-search"></i></span>
</div>
HTML Code Copied!
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #060606, #382e2e, #0b0b0a);
font-family: Arial, sans-serif;
}
.input-container {
width: 240px;
position: relative;
}
.icon {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
color: #fdfdfd;
font-size: 18px;
cursor: pointer;
transition: color 0.3s ease-in-out, transform 0.3s ease-in-out;
}
.input-container:hover .icon {
color: #ff6347;
transform: translateY(-50%) rotate(15deg);
}
.input {
width: 100%;
height: 40px;
padding: 10px;
border: 3px solid #ffffff;
border-radius: 20px;
background: rgba(255, 255, 255, 0.1);
font-size: 14px;
color: #ffffff;
text-transform: uppercase;
letter-spacing: 1.5px;
backdrop-filter: blur(8px);
transition: border-color 0.4s ease-in-out, background 0.4s ease-in-out, box-shadow 0.4s ease-in-out;
}
.input:focus {
outline: none;
border-color: #ff6347;
background: rgba(255, 255, 255, 0.2);
box-shadow: 0 0 10px #ff6347, 0 0 20px #ff4500;
}
.input::placeholder {
color: rgba(255, 255, 255, 0.7);
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="form-control">
<input type="text" required>
<label>
<span style="transition-delay:0ms">U</span><span style="transition-delay:50ms">s</span><span style="transition-delay:100ms">e</span><span style="transition-delay:150ms">r</span><span style="transition-delay:200ms">n</span><span style="transition-delay:250ms">a</span><span style="transition-delay:300ms">m</span><span style="transition-delay:350ms">e</span>
</label>
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
background-color: #0d1117;
color: #fff;
font-family: 'Poppins', sans-serif;
}
.form-control {
position: relative;
margin: 20px 0 40px;
width: 220px;
}
.form-control input {
background-color: transparent;
border: 0;
border-bottom: 2px solid #02ed8b;
border-left: 2px solid #02ed8b;
border-right: 2px solid #02ed8b;
display: block;
width: 100%;
padding: 15px 0;
font-size: 18px;
color: #04ff92;
text-align: center;
transition: all 0.3s ease-in-out;
}
.form-control input:focus,
.form-control input:valid {
outline: none;
border-bottom: 5px solid #07fbff;
border-left: 5px solid #07fbff;
border-right: 5px solid #07fbff;
border-radius: 2px;
}
.form-control label {
position: absolute;
top: 15px;
left: 0;
width: 100%;
text-align: center;
pointer-events: none;
}
.form-control label span {
display: inline-block;
font-size: 18px;
color: #00f97d;
transform: translateY(0);
opacity: 1;
transition: all 0.4s ease-in-out;
}
/* On focus: slide up and fade */
.form-control input:focus+label span,
.form-control input:valid+label span {
color: #00d4ec;
transform: translateY(-30px) translateX(-50px);
opacity: 1;
}
/* Reverse animation: slide down and fade */
.form-control input:not(:focus):not(:valid)+label span {
transform: translateY(0);
opacity: 1;
color: #08eb6b;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="form-control">
<input type="text" required>
<label>
<span style="transition-delay:0ms">U</span><span style="transition-delay:50ms">s</span><span style="transition-delay:100ms">e</span><span style="transition-delay:150ms">r</span><span style="transition-delay:200ms">n</span><span style="transition-delay:250ms">a</span><span style="transition-delay:300ms">m</span><span style="transition-delay:350ms">e</span>
</label>
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
background: linear-gradient(135deg, #000000, #1e1f21);
font-family: 'Poppins', sans-serif;
}
.form-control {
position: relative;
margin: 20px 0 40px;
width: 220px;
}
.form-control input {
background-color: transparent;
border: 0;
border-bottom: 5px solid #f43676;
border-top: 5px solid #4336f4;
display: block;
width: 100%;
padding: 15px 0;
font-size: 18px;
color: #f43676;
text-align: left;
padding: 1rem;
transition: all 0.3s ease-in-out;
}
.form-control input:focus,
.form-control input:valid {
outline: none;
border-bottom-color: #2563eb;
border-top-color: #f43676;
border-radius: 25px;
box-shadow: 0 10px 10px #f30d6999;
}
.form-control label {
position: absolute;
top: 15px;
left: 0;
width: 100%;
text-align: center;
pointer-events: none;
}
.form-control label span {
display: inline-block;
font-size: 18px;
color: #64748b;
transform: rotate(0deg) scale(1);
opacity: 1;
transition: all 0.5s cubic-bezier(0.1, 0.55, 0.65, .5);
}
/* On focus: rotate and scale up */
.form-control input:focus+label span,
.form-control input:valid+label span {
color: #eb2574;
transform: translateY(60px);
opacity: 1;
font-weight: 900;
}
/* Reverse animation: rotate back and scale down */
.form-control input:not(:focus):not(:valid)+label span {
transform: rotate(0deg) scale(1);
opacity: 1;
color: #64748b;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="form-control">
<input type="text" required>
<label>
<span style="transition-delay:0ms">U</span><span style="transition-delay:50ms">s</span><span style="transition-delay:100ms">e</span><span style="transition-delay:150ms">r</span><span style="transition-delay:200ms">n</span><span style="transition-delay:250ms">a</span><span style="transition-delay:300ms">m</span><span style="transition-delay:350ms">e</span>
</label>
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
background: #121212;
font-family: 'Poppins', sans-serif;
color: #fff;
}
.form-control {
position: relative;
width: 240px;
margin: 20px 0;
}
.form-control input {
background-color: transparent;
border: 2px dashed #444;
border-radius: 8px;
padding: 12px 10px;
font-size: 18px;
color: #fff;
text-align: left;
transition: border-color 0.4s cubic-bezier(0.25, 1, 0.5, 1), transform 0.3s ease-in-out;
}
.form-control input:focus {
outline: none;
border-color: #00f2ff;
transform: scale(1.05);
}
.form-control label {
position: absolute;
left: 6px;
top: -28px;
pointer-events: none;
font-size: 18px;
color: #aaa;
transition: all 0.4s cubic-bezier(0.5, -0.5, 0.3, 1.5);
}
.form-control input:focus+label span,
.form-control input:valid+label span {
color: #00f2ff;
font-weight: 900;
}
.form-control input:not(:focus):not(:valid)+label span {
transform: translateY(0) translateX(0) rotate(0);
color: #aaa;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="form-control">
<input type="text" required>
<label>
<span>Enter your name</span>
</label>
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
background: linear-gradient(135deg, #ffffff, #f3f4f6);
font-family: 'Poppins', sans-serif;
}
.form-control {
position: relative;
width: 260px;
margin: 20px 0;
}
.form-control input {
background-color: transparent;
border: 2px solid #e5e7eb;
border-radius: 8px;
padding: 12px 10px;
font-size: 16px;
color: #111827;
transition: border-color 0.3s cubic-bezier(0.65, 0, 0.35, 1), transform 0.3s ease-in-out;
}
.form-control input:focus,
.form-control input:valid {
outline: none;
border-image: linear-gradient(90deg, #3b82f6, #9333ea) 1;
transform: scale(1.03);
}
.form-control label {
position: absolute;
top: 12px;
left: 14px;
pointer-events: none;
font-size: 16px;
color: #6b7280;
transition: all 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.form-control label span {
display: inline-block;
font-size: 18px;
color: #00f97d;
transform: translateY(0);
opacity: 1;
transition: all 0.4s ease-in-out;
}
.form-control input:focus+label span,
.form-control input:valid+label span {
transform: translateY(-40px) translateX(-20px);
opacity: 1;
background: linear-gradient(90deg, #3b82f6, #9333ea);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-weight: bold;
}
.form-control input:not(:focus):not(:valid)+label span {
top: 12px;
left: 14px;
font-size: 16px;
color: #6b7280;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="form-control">
<input type="text" required>
<label>
<span style="transition-delay:0ms">U</span><span style="transition-delay:100ms">s</span><span style="transition-delay:200ms">e</span><span style="transition-delay:300ms">r</span><span style="transition-delay:400ms">n</span><span style="transition-delay:500ms">a</span><span style="transition-delay:600ms">m</span><span style="transition-delay:700ms">e</span>
</label>
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
margin: 0;
background-color: #2b2b2b;
color: #fff;
font-family: 'Courier New', monospace;
}
.form-control {
position: relative;
margin: 30px 0 60px;
width: 300px;
perspective: 1000px;
}
.form-control input {
background-color: transparent;
border: 0;
border-bottom: 4px dashed #ff6b6b;
display: block;
width: 100%;
padding: 20px 0;
font-size: 20px;
color: #ffffff;
text-align: center;
transition: all 0.5s ease-in-out;
transform-style: preserve-3d;
}
.form-control input:focus,
.form-control input:valid {
outline: none;
border-bottom: 6px double #ff2424;
border-left: 6px double #ff2424;
border-right: 6px double #ff2424;
border-radius: 5px;
transform: rotateX(30deg);
}
.form-control label {
position: absolute;
top: 20px;
left: 0;
width: 100%;
text-align: center;
pointer-events: none;
}
.form-control label span {
display: inline-block;
font-size: 20px;
color: #ffcccb;
transform: translateY(0) translateZ(-50px);
opacity: 1;
transition: all 0.6s ease-in-out;
}
/* On focus: slide up and fade */
.form-control input:focus+label span,
.form-control input:valid+label span {
color: #ff6347;
transform: translateY(-50px) translateX(-50px) translateZ(-50px) rotateY(10deg);
opacity: 0.8;
}
/* Reverse animation: slide down and fade */
.form-control input:not(:focus):not(:valid)+label span {
transform: translateY(0) translateZ(-50px);
opacity: 1;
color: #ffcccb;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="form-control">
<input type="text" required>
<label>
<span style="transition-delay:0ms">U</span><span style="transition-delay:100ms">s</span><span style="transition-delay:200ms">e</span><span style="transition-delay:300ms">r</span><span style="transition-delay:400ms">n</span><span style="transition-delay:500ms">a</span><span style="transition-delay:600ms">m</span><span style="transition-delay:700ms">e</span>
</label>
</div>
HTML Code Copied!
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
background-color: #1a1a1a;
color: #fff;
font-family: 'Arial Black', sans-serif;
}
.form-control {
position: relative;
margin: 40px 0 80px;
width: 350px;
perspective: 1500px;
}
.form-control input {
background-color: transparent;
border: 0;
border-left: 4px dashed #46ff80;
border-right: 4px dashed #fd0a9c;
display: block;
width: 100%;
padding: 25px 0;
font-size: 22px;
color: #ffffff;
text-align: center;
transition: all 0.6s cubic-bezier(0.175, 0.885, 0.320, 1.275);
transform-style: preserve-3d;
}
.form-control input:focus,
.form-control input:valid {
outline: none;
border-bottom: 6px double #e7089d;
border-left: 6px double #0af2fa;
border-right: 6px double #31ff87;
box-shadow: 0 0 10px 5px #00e5ee;
border-radius: 30px;
transform: rotateX(20deg) rotateY(15deg) translateZ(20px);
}
.form-control label {
position: absolute;
top: 25px;
left: 0;
width: 100%;
text-align: center;
pointer-events: none;
}
.form-control label span {
display: inline-block;
font-size: 22px;
color: #76c7c0;
transform: translateY(0) translateZ(-100px);
opacity: 1;
transition: all 0.7s cubic-bezier(0.1, 0.28, 0.935, 0.45);
}
/* On focus: slide up and fade with cubic-bezier */
.form-control input:focus+label span,
.form-control input:valid+label span {
color: #00e5ee;
transform: translateY(-80px) translateX(-50px) translateZ(-100px) rotateY(20deg);
opacity: 0.9;
}
/* Reverse animation: slide down and fade with cubic-bezier */
.form-control input:not(:focus):not(:valid)+label span {
transform: translateY(0) translateZ(-100px);
opacity: 1;
color: #76c7c0;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="brutalist-container">
<input placeholder="ENTER YOUR QUERY" class="brutalist-input smooth-type" type="text" />
<label class="brutalist-label">BIZARRE BRUTALIST</label>
</div>
HTML Code Copied!
body {
margin: 0;
padding: 0;
font-family: 'Courier New', monospace;
background-color: #171717;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.brutalist-container {
position: relative;
width: 300px;
font-family: 'Courier New', monospace;
perspective: 1500px;
}
.brutalist-input {
width: 100%;
padding: 20px;
font-size: 20px;
font-weight: bold;
color: #000;
background-color: #f0f0f0;
border: 5px solid #8b008b;
position: relative;
overflow: hidden;
border-radius: 0;
outline: none;
transition: all 0.5s cubic-bezier(0.175, 0.885, 0.320, 1.275);
box-shadow: 6px 6px 0 #8b008b, 12px 12px 0 #ff4500;
}
@keyframes glitch {
0% {
transform: translate(0);
}
20% {
transform: translate(-2px, 2px);
}
40% {
transform: translate(-2px, -2px);
}
60% {
transform: translate(2px, 2px);
}
80% {
transform: translate(2px, -2px);
}
100% {
transform: translate(0);
}
}
.brutalist-input:focus {
animation: focus-pulse 4s cubic-bezier(0.175, 0.885, 0.320, 1.275) infinite,
glitch 0.3s cubic-bezier(0.175, 0.885, 0.320, 1.275) infinite;
}
.brutalist-input:focus::after {
content: "";
position: absolute;
top: -3px;
left: -3px;
right: -3px;
bottom: -3px;
background: #f0f0f0;
z-index: -1;
border: 5px solid #ff4500;
}
.brutalist-input:focus::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #8b008b;
z-index: -2;
clip-path: inset(0 100% 0 0);
animation: glitch-slice 4s steps(2, end) infinite;
}
@keyframes glitch-slice {
0% {
clip-path: inset(0 100% 0 0);
}
10% {
clip-path: inset(0 5% 0 0);
}
20% {
clip-path: inset(0 80% 0 0);
}
30% {
clip-path: inset(0 10% 0 0);
}
40% {
clip-path: inset(0 50% 0 0);
}
50% {
clip-path: inset(0 30% 0 0);
}
60% {
clip-path: inset(0 70% 0 0);
}
70% {
clip-path: inset(0 15% 0 0);
}
80% {
clip-path: inset(0 90% 0 0);
}
90% {
clip-path: inset(0 5% 0 0);
}
100% {
clip-path: inset(0 100% 0 0);
}
}
.brutalist-label {
position: absolute;
left: -4px;
top: -38px;
font-size: 16px;
font-weight: bold;
color: #fff;
background-color: #8b008b;
padding: 6px 12px;
transform: rotate(-2deg);
z-index: 1;
transition: all 0.5s cubic-bezier(0.175, 0.885, 0.320, 1.275);
}
.brutalist-input:focus+.brutalist-label {
transform: rotate(0deg) scale(1.1);
background-color: #ff4500;
box-shadow: 0 0 10px #ff4500;
}
.smooth-type {
position: relative;
overflow: hidden;
}
.smooth-type::before {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: linear-gradient(90deg, #f0f0f0 0%, rgba(255, 255, 255, 0) 100%);
z-index: 1;
opacity: 0;
transition: opacity 0.5s ease;
}
.smooth-type:focus::before {
opacity: 1;
animation: type-gradient 2s linear infinite;
}
@keyframes type-gradient {
0% {
background-position: 300px 0;
}
100% {
background-position: 0 0;
}
}
.brutalist-input::placeholder {
color: #888;
transition: color 0.5s ease;
}
.brutalist-input:focus::placeholder {
color: transparent;
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!
Edit & Get Code
<div class="brutalist-container">
<input placeholder="SEARCH THE UNKNOWN" class="brutalist-input smooth-type" type="text" />
<label class="brutalist-label">DISTORTED NEON BRUTALISM</label>
</div>
HTML Code Copied!
body {
margin: 0;
padding: 0;
font-family: 'Courier New', monospace;
background-color: #000000;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
overflow: hidden;
}
.brutalist-container {
position: relative;
width: 350px;
font-family: 'Courier New', monospace;
perspective: 2000px;
}
.brutalist-input {
width: 100%;
padding: 25px;
font-size: 24px;
font-weight: bold;
color: #26e5af;
background-color: #1a1a1a;
border: 5px solid #24ffd3;
position: relative;
overflow: hidden;
border-radius: 0;
outline: none;
transition: all 0.8s cubic-bezier(0.165, 0.840, 0.440, 1.000);
box-shadow: 6px 6px 0 #26e9ff, 12px 12px 0 #ff00ff;
}
.brutalist-input::placeholder {
color: #2affd1;
transition: color 0.8s ease;
}
.brutalist-input:focus::placeholder {
color: transparent;
}
@keyframes neon-glow {
0%,
100% {
box-shadow: 6px 6px 0 #18d9e7, 12px 12px 0 #ff0088, 0 0 20px #00ff00, 0 0 40px #ff00ff;
}
50% {
box-shadow: 6px 6px 0 #ff0095, 12px 12px 0 #20ffc3, 0 0 20px #ff00ff, 0 0 40px #00ff00;
}
}
.brutalist-input:focus {
border-color: #ff0088;
color: #ff0077;
animation: neon-glow 1s cubic-bezier(0.165, 0.840, 0.440, 1.000) infinite;
}
.brutalist-input:focus::after {
content: "";
position: absolute;
top: -5px;
left: -5px;
right: -5px;
bottom: -5px;
background: #1a1a1a;
z-index: -1;
border: 5px solid #ff0084;
box-shadow: inset 0 0 20px #ff007b, inset 0 0 40px #00ffcc;
animation: pulse 1s cubic-bezier(0.165, 0.840, 0.440, 1.000) infinite;
}
@keyframes pulse {
0%,
100% {
transform: scale(1);
box-shadow: inset 0 0 20px #ff00b7, inset 0 0 40px #00ff73;
}
50% {
transform: scale(1.05);
box-shadow: inset 0 0 30px #ff008c, inset 0 0 50px #00ff73;
}
}
.brutalist-label {
position: absolute;
left: -6px;
top: -40px;
font-size: 18px;
font-weight: bold;
color: #ffffff;
background-color: #00d5ff;
padding: 8px 15px;
transform: rotate(-3deg);
z-index: 1;
transition: all 0.8s cubic-bezier(0.165, 0.840, 0.440, 1.000);
box-shadow: 0 0 10px #00ffbf, 0 0 20px #ff00ae;
}
.brutalist-input:focus+.brutalist-label {
transform: rotate(0deg) scale(1.15);
background-color: #ff0084;
color: #00ff91;
box-shadow: 0 0 20px #ff00c8, 0 0 40px #00ff73;
animation: label-glitch 0.8s cubic-bezier(0.165, 0.840, 0.440, 1.000) infinite;
}
@keyframes label-glitch {
0%,
100% {
transform: rotate(0deg) scale(1.15);
background-color: #ff006a;
color: #00ff9d;
}
50% {
transform: rotate(2deg) scale(1.2);
background-color: #30ff8d;
color: #ff0084;
}
}
.smooth-type {
position: relative;
overflow: hidden;
}
.smooth-type::before {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: linear-gradient(90deg, #00ffa6 0%, rgba(0, 255, 0, 0) 100%);
z-index: 1;
opacity: 0;
transition: opacity 0.8s ease;
}
.smooth-type:focus::before {
opacity: 1;
animation: type-gradient 2s linear infinite;
}
@keyframes type-gradient {
0% {
background-position: 400px 0;
}
100% {
background-position: 0 0;
}
}
CSS Code Copied!
<!-- No JS code needed for this element -->
JS Code Copied!