You can use the following components as reference:
- Search component under General Category
- Search component under the we-retail category
- Core Components search component
You might want to review the WKND tutorial - a multi-part tutorial designed for developers new to Adobe Experience Manager: WKND Tutorial Overview
In Chapter 7 it covers a headers design including a search component 7 - Header and Footer
A complete solution is available on GitHub, hence you can adapt it for your project.