Canary works with local search indexes like Pagefind too: https://getcanary.dev/docs/local/demo
For both demo, you'll find small "code" tab to see actual code to build the search UI.
Self-hosting guide: https://getcanary.dev/docs/cloud/self-host
Would love to hear any feedback!