跳到內容
Yuva roadmap選單

Yuva roadmap

A public roadmap board: stage tabs with counts, ideas by top votes with vote buttons, the idea view with replies, and Suggest an idea with similar ideas.

Roadmap

預覽使用範例資料執行,不需要網路,也不需要頻道。

安裝

在 shadcn 專案中執行。檔案會複製到你自己的程式碼裡。

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

用法

tsx
import { YuvaRoadmap } from "@/components/yuva-roadmap"

<YuvaRoadmap server={server} channel={channel} />

Props

YuvaRoadmapProps

Prop類型
server?string
channel?string
identityToken?IdentityTokenSource | null
client?YuvaClient
defaultStage?YuvaRoadmapStage
labels?Partial<YuvaRoadmapLabels>
discussionLabels?Partial<YuvaDiscussionsLabels>
locale?string
className?string

YuvaRoadmapListProps

Prop類型
stage?YuvaRoadmapStage
onStageChange?(stage: YuvaRoadmapStage) => void
onSelect(idea: Discussion) => void
onSuggest?() => void
labels?Partial<YuvaRoadmapLabels>
discussionLabels?Partial<YuvaDiscussionsLabels>
className?string

標籤

每個標籤都有英文預設值。傳入部分 labels 物件即可修改或翻譯。

標籤預設值
heading"Roadmap"
stageIdeas"Ideas"
stagePlanned"Planned"
stageInProgress"In progress"
stageShipped"Shipped"
stageClosed"Closed"
suggest"Suggest an idea"
suggestHeading"Suggest an idea"
suggestTitlePlaceholder"Your idea in a few words"
suggestBodyPlaceholder"Describe it. What do you need, and why? Markdown works."
sendIdea"Send idea"
similarIdeas"Similar ideas"
ideaSent"Thanks! Your idea is on the board."
ideaPending"Thanks! The team will review your idea before it is shown."
votingClosed"Voting is closed for this idea."
empty"Nothing here yet."
vote(title) => `Vote for ${title}`
removeVote(title) => `Remove your vote for ${title}`
votes(count) => (count === 1 ? "1 vote" : `${count} votes`)
back"Roadmap"

相依套件

安裝此項目時還會加入以下內容。

來自 shadcn/ui 的元件

其他 Yuva 項目

npm 套件