Back

Input

1 
2<div class="searchbar">
3 <div class="searchbar-wrapper">
4 <div class="searchbar-left">
5 <div class="search-icon-wrapper">
6 <span class="search-icon searchbar-icon">
7 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
8 <path
9 d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z">
10 </path>
11 </svg>
12 </span>
13 </div>
14 </div>
15 
16 <div class="searchbar-center">
17 <div class="searchbar-input-spacer"></div>
18 
19 <input type="text" class="searchbar-input" maxlength="2048" name="q" autocapitalize="off" autocomplete="off"
20 title="Search" role="combobox" placeholder="Search Google" />
21 </div>
22 
23 <div class="searchbar-right">
24 <svg class="voice-search" role="button" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
25 <path fill="#4285f4"
26 d="m12 15c1.66 0 3-1.31 3-2.97v-7.02c0-1.66-1.34-3.01-3-3.01s-3 1.34-3 3.01v7.02c0 1.66 1.34 2.97 3 2.97z">
27 </path>
28 <path fill="#34a853" d="m11 18.08h2v3.92h-2z"></path>
29 <path fill="#fbbc05"
30 d="m7.05 16.87c-1.27-1.33-2.05-2.83-2.05-4.87h2c0 1.45 0.56 2.42 1.47 3.38v0.32l-1.15 1.18z"></path>
31 <path fill="#ea4335"
32 d="m12 16.93a4.97 5.25 0 0 1 -3.54 -1.55l-1.41 1.49c1.26 1.34 3.02 2.13 4.95 2.13 3.87 0 6.99-2.92 6.99-7h-1.99c0 2.92-2.24 4.93-5 4.93z">
33 </path>
34 </svg>
35 </div>
36 </div>
37</div>
1 
2.searchbar {
3 font-size: 14px;
4 font-family: arial, sans-serif;
5 color: #202124;
6 display: flex;
7 z-index: 3;
8 height: 44px;
9 background: white;
10 border: 1px solid #dfe1e5;
11 box-shadow: none;
12 border-radius: 24px;
13 margin: 0 auto;
14 width: auto;
15 max-width: 224px;
16}
17 
18.searchbar:hover {
19 box-shadow: 0 1px 6px rgb(32 33 36 / 28%);
20 border-color: rgba(223,225,229,0);
21}
22 
23.searchbar-wrapper {
24 flex: 1;
25 display: flex;
26 padding: 5px 8px 0 14px;
27}
28 
29.searchbar-left {
30 font-size: 14px;
31 font-family: arial, sans-serif;
32 color: #202124;
33 display: flex;
34 align-items: center;
35 padding-right: 13px;
36 margin-top: -5px;
37}
38 
39.search-icon-wrapper {
40 margin: auto;
41}
42 
43.search-icon {
44 margin-top: 3px;
45 color: #9aa0a6;
46 height: 20px;
47 line-height: 20px;
48 width: 20px;
49}
50 
51.searchbar-icon {
52 display: inline-block;
53 fill: currentColor;
54 height: 24px;
55 line-height: 24px;
56 position: relative;
57 width: 24px;
58}
59 
60.searchbar-center {
61 display: flex;
62 flex: 1;
63 flex-wrap: wrap;
64}
65 
66.searchbar-input-spacer {
67 color: transparent;
68 flex: 100%;
69 white-space: pre;
70 height: 34px;
71 font-size: 16px;
72}
73 
74.searchbar-input {
75 background-color: transparent;
76 border: none;
77 margin: 0;
78 padding: 0;
79 color: rgba(0, 0, 0, .87);
80 word-wrap: break-word;
81 outline: none;
82 display: flex;
83 flex: 100%;
84 margin-top: -37px;
85 height: 34px;
86 font-size: 16px;
87 max-width: 100%;
88 width: 100%;
89}
90 
91.searchbar-right {
92 display: flex;
93 flex: 0 0 auto;
94 margin-top: -5px;
95 align-items: stretch;
96 flex-direction: row
97}
98 
99.searchbar-clear-icon {
100 margin-right: 12px
101}
102 
103.voice-search {
104 flex: 1 0 auto;
105 display: flex;
106 cursor: pointer;
107 align-items: center;
108 border: 0;
109 background: transparent;
110 outline: none;
111 padding: 0 8px;
112 width: 2.8em;
113}

MIT License

Copyright © 2025 TimTrayler (Tim Trayler)


Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:


The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.