I’m not sure why you would need to see code. This is a standard HTML5 element <input type=”search”>.
When you start typing a small clear element appears (x) depending on browser support. chrome for example displays a small blue cross to the right hand side.