पूर्वावलोकन नमुना डेटावर चालते. त्याला नेटवर्क किंवा चॅनेल लागत नाही.
tsx
import { YuvaChatComposer } from "@/components/yuva-chat-composer"
import { useYuvaChat } from "@/hooks/use-yuva-chat"
export function Composer() {
const chat = useYuvaChat({
server={process.env.NEXT_PUBLIC_YUVA_SERVER}
channel={process.env.NEXT_PUBLIC_YUVA_CHANNEL},
})
return <YuvaChatComposer chat={chat} />
}इन्स्टॉलेशन
हे shadcn प्रकल्पात चालवा. फाइल्स तुमच्या स्वतःच्या कोडमध्ये कॉपी होतात.
Shell
npx shadcn@latest add https://useyuva.com/r/yuva-chat-composer.jsonShell
pnpm dlx shadcn@latest add https://useyuva.com/r/yuva-chat-composer.jsonShell
yarn dlx shadcn@latest add https://useyuva.com/r/yuva-chat-composer.jsonShell
bunx --bun shadcn@latest add https://useyuva.com/r/yuva-chat-composer.jsonवापर
tsx
import { YuvaChatComposer } from "@/components/yuva-chat-composer"
<YuvaChatComposer chat={chat} />Props
YuvaChatComposerProps
| Prop | प्रकार |
|---|---|
chat | YuvaChatState |
labels? | Partial<YuvaChatLabels> |
locale? | string |
disabled? | boolean |
onCapture? | () => File | null | undefined | Promise<File | null | undefined> |
className? | string |
लेबल
लेबल Yuva chat पानावर सूचीबद्ध आहेत.
अवलंबित्वे
हा आयटम इन्स्टॉल केल्याने खालील गोष्टीही जोडल्या जातात.