<poll-widget>

An embeddable poll built with Lit. Vote, and the bars animate to show the results.

Try it

Local mode

No backend: question and options come from attributes, and votes are counted in the browser.

API mode, themed

Loads results from requestapi and sends the vote to voteapi. Here the API is faked in the page.

Pick an option…

Use it

npm install @firstprateek/poll-widget
// main.js
import '@firstprateek/poll-widget';

<!-- index.html -->
<poll-widget
  requestapi="https://example.com/api/poll"
  voteapi="https://example.com/api/poll">
</poll-widget>