Add search bar (without modal)

Is it possible to add a search bar directly into the markup, rather than using the {{search}} helper, which adds a button that opens a modal with a searchbar?

The design i am attempting to create has a search bar that is always visible, so {{search}} doesn’t work for this design.

It’s possible, but requires theme customization, especially Javascript code to complete the search function.

How? I’m making a theme from scratch, thats not a problem, I just don’t see any documentation on this.

I should add that I don’t want to reinvent the search functionality, I want to reuse the ghost search but just change the markup so that the search bar appears next to the button instead of in a modal

I don’t want to reinvent the search functionality

Reinvention is required if you need search bar instead of search modal.