Ranked-choice voting, counted in the open
Add a ranked ballot to any web page with two lines of HTML. Then watch the count here, round by round, as ballots move from candidate to candidate until the winners emerge.
Elections
- Loading…
Embed a ballot on your site
Works on any website: paste the script once, then add a <rcv-election> tag wherever you want a ballot.
<script src="https://elections.appfarms.org/widget.js" defer></script>
<rcv-election
election-id="example-com-board-2026"
title="Board of Directors 2026"
description="Choose three directors."
candidates="Alice Chen|Bob Ruiz|Carla Diaz|Dev Patel|Erin Wu"
seats="3"
closes="2026-12-31T23:59:00Z">
</rcv-election>
Try it
This is a live ballot. Your vote goes into a real election you can watch below the ballot.
Attributes
| Attribute | Meaning |
|---|---|
election-id required | Unique, lowercase, 3–80 characters (a–z, 0–9, . _ -). Ids are global, so start yours with your domain, e.g. example-com-… |
title required | Shown at the top of the ballot. |
candidates required | Separated by |, or a JSON array. 2–40 candidates. |
seats | Number of winners (default 1). 1 = instant runoff; more = single transferable vote. |
description | Short text under the title. |
opens, closes | ISO 8601 date-times, e.g. 2026-12-31T23:59:00Z. |
live-results | true (default) shows results while voting is open; false hides them until closes. |
unlisted | true keeps the election off the public list on this site. |
shuffle | false shows candidates in the order given (default: shuffled per voter). |
theme | auto (default), light or dark. |
Good to know
- Settings lock on first use. The first page that loads an
election-idsets its title, candidates, seats and dates. Any embed of the same id must use identical settings, or it shows an error. To change an election, use a new id. - The same election can be embedded on many sites. All ballots go into one count.
- One vote per browser. The widget remembers that a browser voted using that site's local storage, and the server rejects repeat ballots from the same browser. This is a poll, not a secure election: someone who clears their storage or switches browsers can vote again, within a per-network rate limit.
- Styling. Set CSS custom properties on the element, such as
--rcv-accent,--rcv-bg,--rcv-fg,--rcv-border,--rcv-radiusand--rcv-font, or style the parts::part(card),::part(submit),::part(candidate)and::part(ranked-item). - Events. The element fires
rcv-voted(withdetail.ranking) andrcv-error.