Updated
Feature Votes
ProCustomize
Color
List height420px
Width500px
Installation
ProFeature Votes is a Pro component
Sign in to see the source, or install it with a license key. The live preview and props above are free to explore.
Install with a key
- Add the Pro registry to
components.json:components.json { "registries": { "@uibrik-pro": { "url": "https://uibrik.com/r/pro/{name}.json", "headers": { "Authorization": "Bearer ${UIBRIK_LICENSE}" } } } } - Put your key in
.env.localand add that file to.gitignore:.env.local UIBRIK_LICENSE=your-license-key - Install it:
Terminal npx shadcn@latest add @uibrik-pro/feature-votes
Loading your installation…
Usage
import { FeatureVotes } from "@/components/uibrik/feature-votes/feature-votes";const statuses = { review: { label: "Review", color: "#8e8e96" }, planned: { label: "Planned", color: "#2f7cf6" }, building: { label: "Building", color: "#e8890c" }, shipped: { label: "Shipped", color: "#16a35a" },};<FeatureVotes title="Feature requests" color="#7c5cff" maxHeight={420} showSuggest suggestPlaceholder="Suggest a feature" allLabel="All" width={500} defaultItems={[]} statuses={statuses} newStatus="review" onVote={(id, voted) => {}} onSuggest={(title) => {}} // items={[…]} // onItemsChange={(items) => {}} // onComment={(id, comment) => {}} // me={{}}/>Where to use Feature Votes
Public roadmaps
Status pills and the ranking show what's planned, in progress and shipped at a glance.
In-app feature requests
People suggest and vote from one card, and duplicates get votes instead of new tickets.
Pairs with Morphing Popover
Customer advisory boards
Opening a row shows who voted and a thread to flip through, so the reasons travel with the count.
Props
FeatureVotes- title
- Type string
- "Feature requests"
- Heading above the filters, beside the total votes. Empty hides it.
- color
- Type string
- "#7c5cff"
- Colour of a vote once cast.
- maxHeight
- Type number
- 420
- Height of the list before it scrolls.
- showSuggest
- Type boolean
- true
- Show the field for suggesting a new request.
- suggestPlaceholder
- Type string
- "Suggest a feature"
- Placeholder of the suggest field.
- allLabel
- Type string
- "All"
- Label of the filter that shows every request.
- width
- Type number
- 500
- Width of the card; never wider than its container.
- items / onItemsChange
- Type FeatureRequest[] / (items) => void
- –
- Controlled list of { id, title, description?, status, votes, voted?, comments?, voters?: { name, avatar? }[], thread?: { name, avatar?, text, time? }[] }. Rows are ranked by votes.
- defaultItems
- Type FeatureRequest[]
- –
- List on mount when uncontrolled.
- onVote
- Type (id, voted) => void
- –
- Called when the current person votes or takes a vote back.
- onSuggest
- Type (title) => void
- –
- Called with the title of a new request.
- onComment / me
- Type (id, comment) => void / { name, avatar? }
- –
- Called when the current person replies in a request's thread; me is who they are.
- statuses
- Type Record<string, { label, color }>
- –
- Status keys to their label and colour. Filters follow this order; empty ones hide.
- newStatus
- Type string
- "review"
- Status given to a new suggestion.
- className
- Type string
- –
- Classes for the wrapper.