Naar de inhoud springen
Yuva discussion composerMenu

Yuva discussion composer

A Markdown composer with Write and Preview tabs for new discussions, replies and edits, and the reader sign-in prompt.

Markdown is supported.

Het voorbeeld draait op voorbeeldgegevens. Het heeft geen netwerk en geen kanaal nodig.

Installatie

Voer dit uit in een shadcn-project. De bestanden worden naar je eigen code gekopieerd.

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

Gebruik

tsx
import { YuvaDiscussionComposer } from "@/components/yuva-discussion-composer"

<YuvaDiscussionComposer withTitle onSubmit={async ({ title, body }) => {}} />

Props

YuvaDiscussionComposerProps

PropType
withTitle?boolean
initialTitle?string
initialBody?string
submitLabel?string
placeholder?string
autoFocus?boolean
labels?Partial<YuvaDiscussionsLabels>
className?string
onTitleChange?(title: string) => void
onSubmit(input: { title: string; body: string }) => Promise<unknown>
onCancel?() => void

YuvaSignInProps

PropType
labels?Partial<YuvaDiscussionsLabels>
className?string

Labels

De labels staan op Yuva discussions.

Afhankelijkheden

Als je dit item installeert, worden ook de volgende items toegevoegd.

Componenten van shadcn/ui

Andere Yuva-items

npm-pakketten