Awesome Search Button with Input Animation
How do I make an awesome search button with input animation?
What is a awesome search button with input animation? How do you make a awesome search button with input animation? This script and codes were developed by EY-Intuitive on 17 January 2023, Tuesday.
Awesome Search Button with Input Animation - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Awesome Search Button with Input Animation</title> <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ * { box-sizing: border-box;
}
*,
body { font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; font-weight: 300;
}
.wrapper { text-align: center; margin: 100px auto;
}
.icon-search-container { display: inline-block; border: 2px solid #d9d9d9; border-radius: 50px; height: 50px; width: 50px; position: relative; transition: width 0.2s ease-out; backface-visibility: hidden;
}
.icon-search-container.active { width: 285px;
}
.icon-search-container.active .fa-times-circle { opacity: 1;
}
.icon-search-container.active .search-input { width: 200px;
}
.icon-search-container .fa-search { color: #2980b9; font-size: 30px; position: absolute; top: 7px; left: 8px; cursor: pointer;
}
.icon-search-container .fa-times-circle { opacity: 0; color: #d9d9d9; font-size: 20px; position: absolute; top: 12px; right: 8px; transition: opacity 0.2s ease-out; cursor: pointer;
}
.icon-search-container .search-input { position: absolute; cursor: default; left: 45px; top: 6px; width: 0; padding: 5px; border: none; outline: none; font-size: 18px; line-height: 20px; background-color: rgba(255, 255, 255, 0); transition: width 0.2s ease-out;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="wrapper"> <div class="icon-search-container" data-ic-class="search-trigger"> <span class="fa fa-search"></span> <input type="text" class="search-input" data-ic-class="search-input" placeholder="Search"/> <span class="fa fa-times-circle" data-ic-class="search-clear"></span> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Awesome Search Button with Input Animation - Script Codes CSS Codes
* { box-sizing: border-box;
}
*,
body { font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; font-weight: 300;
}
.wrapper { text-align: center; margin: 100px auto;
}
.icon-search-container { display: inline-block; border: 2px solid #d9d9d9; border-radius: 50px; height: 50px; width: 50px; position: relative; transition: width 0.2s ease-out; backface-visibility: hidden;
}
.icon-search-container.active { width: 285px;
}
.icon-search-container.active .fa-times-circle { opacity: 1;
}
.icon-search-container.active .search-input { width: 200px;
}
.icon-search-container .fa-search { color: #2980b9; font-size: 30px; position: absolute; top: 7px; left: 8px; cursor: pointer;
}
.icon-search-container .fa-times-circle { opacity: 0; color: #d9d9d9; font-size: 20px; position: absolute; top: 12px; right: 8px; transition: opacity 0.2s ease-out; cursor: pointer;
}
.icon-search-container .search-input { position: absolute; cursor: default; left: 45px; top: 6px; width: 0; padding: 5px; border: none; outline: none; font-size: 18px; line-height: 20px; background-color: rgba(255, 255, 255, 0); transition: width 0.2s ease-out;
}
Awesome Search Button with Input Animation - Script Codes JS Codes
$(document).ready(function(){ var $searchTrigger = $('[data-ic-class="search-trigger"]'), $searchInput = $('[data-ic-class="search-input"]'), $searchClear = $('[data-ic-class="search-clear"]'); $searchTrigger.click(function(){ var $this = $('[data-ic-class="search-trigger"]'); $this.addClass('active'); $searchInput.focus(); }); $searchInput.blur(function(){ if($searchInput.val().length > 0){ return false; } else { $searchTrigger.removeClass('active'); } }); $searchClear.click(function(){ $searchInput.val(''); }); $searchInput.focus(function(){ $searchTrigger.addClass('active'); });
});
Developer | EY-Intuitive |
Username | ey_intuitive |
Uploaded | January 17, 2023 |
Rating | 4.5 |
Size | 3,633 Kb |
Views | 8,096 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Step Indicator | 3,692 Kb |
Button Text Color Accessibility Mixin Test | 4,555 Kb |
Jquery Flyout Navigation | 2,667 Kb |
Reading Interaction | 2,598 Kb |
A Pen by EY-Intuitive | 3,258 Kb |
UI Color Shade Previewer | 3,159 Kb |
Google Material Design Nav Submenu Animation | 3,009 Kb |
Progress Button Animation | 3,659 Kb |
Facebook Paper Inspired Menu | 5,617 Kb |
Animated Menu with Submenus | 5,647 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Click Based Rotation Demo | Zeaklous | 2,086 Kb |
FCC Portfolio | Cmwebby | 4,304 Kb |
Buttons for autumn | Nikazawila | 1,795 Kb |
Side Sliding Menu CSS | EduardL | 4,388 Kb |
RPG Style Text Dialogue | Odylic | 2,635 Kb |
Next Word Predictor | Rfalor | 2,776 Kb |
Text Looping Transition | Agelber | 5,619 Kb |
SVG Basics | HipsterBrown | 1,852 Kb |
Lecture 1 | Law | 0 Kb |
Feedback Page | TessDiNapoli | 2,836 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!