Magoo Component UI logo Magoo Component UI
← Catalog

Inline Poll

poll-inline molecule experimental

A compact single-question poll that flips from clickable options to a results view with share bars.

The width preview needs a screen wider than the chosen width — use a larger device (or a desktop browser) to see the desktop and tablet layouts.

Default

Which feature should we build next?

246 total votes

Voted

Which feature should we build next?

  • Dark mode 52%
    128 votes
  • Offline support 30%
    74 votes
  • Keyboard shortcuts 18%
    44 votes

246 total votes

Props

NameTypeReq
question string ✓
options array ✓
total_votes integer
voted boolean

Related components

How to use

behavior.js wires the option buttons: clicking one dispatches a bubbling "poll:vote" CustomEvent whose detail.value is that option's label (read from data-poll-value). The host listens for the event, persists the vote, and re-renders the component in its voted state with the tallied pct values. The results view is pure markup driven by the precomputed pct widths, so it renders in screenshots with no JavaScript.

Use cases

highlightlist-item WCAG AA SEO 35 dir: both ai-generated