Langkau ke kandungan
Yuva help searchMenu

Yuva help search

A search field over the help center with live results: the matched words highlighted in the title and excerpt, and the click counted for the report.

Pratonton berjalan dengan data contoh. Ia tidak memerlukan rangkaian atau saluran.

Pemasangan

Jalankan ini dalam projek shadcn. Fail disalin ke kod anda sendiri.

Shell
npx shadcn@latest add https://useyuva.com/r/yuva-help-search.json

Penggunaan

tsx
import { YuvaHelpSearch } from "@/components/yuva-help-search"

<YuvaHelpSearch server={server} channel={channel} onSelect={(article) => setId(article.id)} />

Props

YuvaHelpSearchProps

PropJenis
server?string
channel?string
client?YuvaClient
identityToken?IdentityTokenSource | null
locale?string
help?YuvaHelpState
query?string
onQueryChange?(query: string) => void
onSelect?(article: ClientHelpArticleSummary, query: string) => void
labels?Partial<YuvaHelpLabels>
className?string

Label

Label disenaraikan di Yuva help.

Kebergantungan

Memasang item ini turut menambah yang berikut.

Komponen daripada shadcn/ui

Item Yuva lain

Pakej npm