Skip to content
Yuva discussion listMenu

Yuva discussion list

The discussions of a page with New, Top and Unanswered tabs, answered and locked badges, votes and reply counts.

The preview runs on sample data. It needs no network and no channel.

Installation

Run this in a shadcn project. The files are copied into your own code.

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

Usage

tsx
import { YuvaDiscussionList } from "@/components/yuva-discussion-list"

<YuvaDiscussionList page={page} onSelect={(discussion) => setId(discussion.id)} />

Props

YuvaDiscussionListProps

PropType
pagestring | null | undefined
sort?DiscussionSort
onSortChange?(sort: DiscussionSort) => void
onSelect(discussion: Discussion) => void
labels?Partial<YuvaDiscussionsLabels>
className?string

Labels

The labels are listed on Yuva discussions.

Dependencies

Installing this item also adds the following.

Components from shadcn/ui

Other Yuva items

npm packages