Vote control
Up and down votes with a rolling score. Choosing the same arrow again clears your vote; the owner saves it optimistically and can revert.
- Score 214Dark mode for the editorEditor
- Score 98Scheduled CSV exportsExports
- Score 57SSO for the Team planSecurity
When to use
- Feature requests, answers, ideas.
- Ranking by the community.
When not to use
- Personal preference with no ranking; use reactions or a rating.
Installation
pnpm dlx shadcn@latest add @caliper/vote-control
Adds its 3 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
applyVote
0 props
No props of its own; it accepts the native props of its root element.
VoteControl
7 props
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It exposes group semantics, with aria-label, aria-pressed, aria-hidden and aria-live kept in step with state. Changes that matter are announced through a live region.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/vote-control.mdThe index of every part is at /llms.txt.