Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
fast-trieve-search-component
Advanced tools
The easiest way to get up and running in your app using trieve search.
The easiest way to get up and running in your app using trieve search.
Install using your favorite package manager:
yarn add trieve-search-component
# or
npm install trieve-search-component
# or
pnpm install trieve-search-component
After installing the first step is to instantiate a new TrieveSDK
like so:
import { TrieveSDK } from "trieve-ts-sdk";
export const trieve = new TrieveSDK({
apiKey: "<your-api-key>",
datasetId: "<dataset-to-use>",
});
And then you can use any of the two components in your React application or as web component:
<TrieveModalSearch trieve={trieve} />
initModalSearch({
trieve: new TrieveSDK({
// your options
})
})
<trieve-modal-search />
If you are using it in JSX environment you will need to add the trieve-modal-search
to the JSX attributes, for solid that would be:
declare module "solid-js" {
namespace JSX {
interface IntrinsicElements {
"trieve-modal-search": {};
"trieve-search": {};
}
}
}
Name | Type | Default |
---|---|---|
datasetId | string | '' |
apiKey | string | '' |
baseUrl | string | "https://api.trieve.ai" |
chat | boolean | true |
analytics | boolean | true |
placeholder | string | "Search..." |
onResultClick | () => void | () => {} |
theme | "light" or "dark" | "light" |
searchOptions | AutocompleteReqPayload | { search_type: "fulltext" } |
openKeyCombination | { key?: string; label?: string; ctrl?: boolean }[] | [{ ctrl: true }, { key: "k", label: "K" }] |
ButtonEl | JSX.ElementType | null |
suggestedQueries | boolean | true |
defaultSearchQueries | string[] | [] |
defaultAiQuestions | string[] | [] |
brandLogoImgSrcUrl | string | null |
brandName | string | null |
brand Color | string | #CB53EB |
problemLink | string (example: "mailto:help@trieve.ai?subject=") | null |
responsive | boolean | false |
<TrieveSearch apiKey="<your trieve apiKey>" datasetId="<your trieve datasetId" />
<trieve-search apiKey="<your trieve apiKey>" datasetId="<your trieve datasetId" />
Name | Type | Default |
---|---|---|
datasetId | string | '' |
apiKey | string | '' |
placeholder | string | "Search..." |
onResultClick | () => void | () => {} |
theme | "light" or "dark" | "light" |
searchOptions | SearchChunksReqPayload | { search_type: "hybrid" } |
MIT
The example/
folder shows the example application for what rendering this would look like
Start the listener to update the search-component's css and javascript
$clients/search-component yarn
$clients/search-component yarn dev
Run the example application
$clients/search-component cd example/
$clients/search-component yarn
$clients/search-component yarn dev
FAQs
The easiest way to get up and running in your app using trieve search.
The npm package fast-trieve-search-component receives a total of 80 weekly downloads. As such, fast-trieve-search-component popularity was classified as not popular.
We found that fast-trieve-search-component demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.