Currently, the search bar goes out of view when scrolling down the results. By pinning it, users will always be able to click the search bar without having to scroll back up. They will also be able to modify search settings, lenses and even access Kagi preferences in the middle of search results.
example code and demo by thibaultmol:
const header = document.querySelector('.app-header.app-content-box');
header.style.position = 'fixed';
header.style.top = '0';
header.style.zIndex = '9999';
header.style.width = '100%';
header.style.backgroundColor = '#18181a';
document.body.style.paddingTop = header.offsetHeight + 'px';
Google search already has a pinned search bar. Bing doesn't pin the search bar, but it becomes pinned when pressing /, keeping the current results visible instead of scrolling back to the top. Both Kagi and DDG scroll to the top of the page when pressing / which works, but is inconvenient for those who use a mouse more than the keyboard. While it could cover up one search result, at the very least, a setting could be added to pin the search bar to the top. This can also be utilized for mobile to change an existing search, which is impossible without scrolling up.