A search bar component using Fluid Topics public API.
Install
npm install @fluid-topics/ft-search-bar
yarn add @fluid-topics/ft-search-bar
Usage
The search bar requires the Fluid Topics public API to be imported independently.
import { html } from "lit"
import "@fluid-topics/ft-search-bar"
import "@fluid-topics/public-api/dist/fluidtopics.min.js"
function render() {
return html`
<ft-search-bar
baseUrl="http://doc.fluidtopics.com"
.displayedFilters=${["Version_FT", "Category", "Platform", "audience"]}
@change=${ (e: SearchStateChangeEvent) => console.log("Search state change:", e.detail) }
@launch-search=${ (e: LaunchSearchEvent) => console.log("Launch search:", e.detail) }
></ft-search-bar>
`
}