In the ever-evolving landscape of web development, the search box remains an integral element of user experience. A well-crafted search box can make navigating a website effortless and enjoyable. To help you stay at the forefront of web design trends, we're thrilled to present the latest edition of our collection.

This collection represents the culmination of countless hours spent scouring the web for the most innovative, aesthetically pleasing, and user-friendly HTML and CSS search box code examples. Our team has scoured resources like CodePen, GitHub, and other trusted repositories to bring you a selection of meticulously hand-picked search boxes that will elevate your web projects. As of June 2023, we are excited to announce the addition of six new items, keeping this collection fresh and up-to-date.

Stay ahead of the curve and create search boxes that not only serve their functional purpose but also elevate the overall user experience on your website. Explore, experiment, and bring your web projects to life with these hand-picked gems from the world of CSS search boxes.

Related Articles:

  1. Bootstrap Search Boxes
  2. jQuery Search Boxes
  3. Tailwind Search Bars

Author

  • Martin Pitt

Made with

  • HTML / CSS

About a code

Inspiration Search Bar

Animation for introducing a search bar on the page.

Compatible browsers: Chrome, Edge, Opera, Safari

Responsive: no

Dependencies: -

Author

  • Ahmad Emran

Made with

  • HTML / CSS

About a code

Awesome Search Box

Awesome search box. Using only HTML & CSS.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: no

Dependencies: font-awesome.css

Author

  • Short Code

Made with

  • HTML / CSS

About a code

Search Box

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: no

Dependencies: font-awesome.css

Author

  • Yuhomyan

Made with

  • HTML / CSS

About a code

Search Box Animation

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: no

Dependencies: font-awesome.css

Author

  • Jon Kantner

Made with

  • HTML / CSS

About a code

Search Input Caret Jump

A search input animation in which the magnifying glass handle flies off, becomes a caret, and plants itself into the field.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: -

Author

  • Coding Script

Made with

  • HTML / CSS

About a code

Search Box Animation

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: -

Author

  • co0kie

Made with

  • HTML / CSS (SCSS)

About a code

Custom Search

Custom CSS search box with shadow and smoke text.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: -

Author

  • Milan Raring

Made with

  • HTML / CSS (SCSS)

About a code

Search Animation - Only CSS

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: no

Dependencies: -

Author

  • Jon Kantner

Made with

  • HTML / CSS

About a code

Animated Search Interaction

A search animation where the head of the magnifying glass becomes the field and the handle grows into a search button. HTML5 validation of non-blank input ensures the field stays open when tabbing to the Search button.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: -

Author

  • Jonas Badalic

Made with

  • HTML / CSS (SCSS)

About a code

Skeuomorphic Search Input

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: no

Dependencies: -

Author

  • Liam

Made with

  • HTML / CSS (SCSS)

About a code

:placeholder-shown Selector

Trying out the :placeholder-shown selector to make a search form. With no JS, it validates and shows/hides the submit button.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: -

Author

  • Takane Ichinose

Made with

  • HTML (Pug) / CSS (SCSS) / JS

About the code

Search Box Version 2

After learning the cubic-bezier function on CSS transition, I tried remaking the search box that I did before.

Compatible browsers: Chrome, Firefox, Opera, Safari

Responsive: no

Dependencies: -

Author

  • Chris Smith

Made with

  • HTML / CSS (SCSS)

About the code

Search Box Focus Effect

Adding a thick outline on focus.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: -

Author

  • Aaron Iker

Made with

  • HTML / CSS (SCSS)

About the code

Search Input Animation

A small little pure CSS animation of search interaction.

Compatible browsers: Chrome, Firefox, Opera, Safari

Responsive: no

Dependencies: -

Author

  • Omar Sherif

Made with

  • HTML / CSS

About the code

Pure CSS Animated Search Bar

Animated seach box using pure HTML & CSS.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: no

Dependencies: -

Demo image: Search Form With Animated Search Button Search Form With Animated Search Button - GIF Demo

Author

  • Himalaya Singh

Made with

  • HTML / CSS

About the code

Search Form With Animated Search Button

Search form with animated search button which transforms into right arrow on hover.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Dependencies: -

Demo image: Expandable Search Bar Animation Expandable Search Bar Animation - GIF Demo

Author

  • Menelaos

Made with

  • HTML / CSS

About the code

Expandable Search Bar Animation

Hover effect for search bar in HTML & CSS.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Dependencies: font-awesome.css

Demo image: Pure CSS Expanding Search Pure CSS Expanding Search - GIF Demo

Author

  • Ana Tudor

Made with

  • HTML / CSS (SCSS)

About the code

Pure CSS Expanding Search

Pure CSS expanding search with custom properties.

Compatible browsers: Chrome, Firefox, Opera, Safari

Dependencies: -

Demo image: Search Bar Search Bar - GIF Demo

Author

  • Albert Feynman

Made with

  • HTML / CSS (SCSS)

About the code

Search Bar

Animated search bar.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Dependencies: -

Demo image: Search Box Search Box - GIF Demo

Author

  • Takane Ichinose

Made with

  • HTML / CSS

About the code

Search Box

Nice search box. Click on search icon, then type your keyword.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Dependencies: -

Demo image: Animated Search Input Animated Search Input - GIF Demo

Author

  • Lucas Henrique

Made with

  • HTML (Pug) / CSS (Sass)

About the code

Animated Search Input

Animated (focus/transition only) search input that looks like a icon.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Dependencies: -

Demo image: Expanding Input Expanding Input - GIF Demo

Author

  • Steve Gardner

Made with

  • HTML / CSS (SCSS) / JavaScript (Babel)

About the code

Expanding Input

A slighty different implementation of Keyframers version.

Compatible browsers: Chrome, Firefox, Opera, Safari

Dependencies: -

Demo image: Increasing Input Increasing Input - GIF Demo

Author

  • Shaw

Made with

  • HTML / CSS (SCSS) / JavaScript

About the code

Increasing Input

Expanding search field with CSS.

Compatible browsers: Chrome, Firefox, Opera, Safari

Dependencies: -

Demo image: Simple On-click Search Field Interaction Simple On-click Search Field Interaction - GIF Demo

Author

  • Charlie Marcotte

Made with

  • HTML (Pug) / CSS (Sass)

About the code

Simple On-click Search Field Interaction

All the icons/images are made with CSS - the onlick interaction is done with the sibling selector ~.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Dependencies: -

Demo image: CSS Effect for Search Input CSS Effect for Search Input - GIF Demo

Author

  • Mihael Tomić

Made with

  • HTML / CSS (PostCSS)

About the code

CSS Effect for Search Input

Just a simple and a bit fancy CSS effect for input field.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Dependencies: -