I have been trying to build a custom search bar similar to the discourse-search-banner plugin. I don’t want to use that plugin as it interferes with the appearance of my theme.
How can I mirror that functionality to a <input type="text" /> of my choice?
I was looking at the source code of the plugin and tried to adapt it to just use my html element but was unable to figure it out. Any tips would be appreciated!
No worries, but that is a theme-component and not a plugin, so it changes a few things. Especially because theme-components work with client-side logic and plugins server-side logic. Or are you looking to make a plugin based of that theme-component?
I don’t really care whether it ends up being a plugin or a theme component as long as I achieve the desired functionality. Basically what I need is to mirror the behavior of the default search (icon in top bar) to a text-input of my choice.
It’s not really the CSS, more the placement and how it fits my HTML structure. If I can figure out how to modify where the component gets injected, I might have a solution. Can you point me in a direction?
With the theme component enabled on your site, inspect the code with your browser and see where it is placed. Adjust there in your browser to find somewhere more comfortable, and use that to update/edit a fork of the TC. That should work.