Poll
The Poll component (ui:poll) renders a voting interface with visual result bars. Supports single and multiple selection modes.
Examples
View Glyph Markdown source
```ui:polltitle: Framework Pollquestion: Which framework do you prefer?options: - React - Vue - Angular - Svelte```Multiple selection
Set multiple: true to allow selecting more than one option.
View Glyph Markdown source
```ui:pollquestion: Which languages do you use? (select all)options: - TypeScript - JavaScript - Python - Rust - Gomultiple: true```Hidden results
Set showResults: false to hide the result bars after voting.
View Glyph Markdown source
```ui:pollquestion: What is your favorite color?options: - Red - Blue - GreenshowResults: false```Properties
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
question | string | Yes | — | The poll question. |
options | string[] | Yes | — | 2 to 10 answer options. |
multiple | boolean | No | false | Allow multiple selections (checkboxes). |
showResults | boolean | No | true | Show result bars after voting. |
title | string | No | — | Optional heading above the poll. |
markdown | boolean | No | false | Enable inline markdown formatting (bold, italic, links, code) in text fields. |
Markdown Support
Enable inline markdown formatting in the question and option labels:
View Glyph Markdown source
```ui:pollquestion: "Which **JavaScript framework** do you prefer for *production* apps?"options: - "**React** (by [Meta](https://react.dev))" - "**Vue** with `Composition API`" - "**Svelte** — *compiler-based*" - "[Angular](https://angular.io)"markdown: true```Supported formatting: bold, italic, code, links
Learn more about markdown in components →
Interaction events
Event kind: poll-vote
| Payload field | Type | Description |
|---|---|---|
selectedOptions | string[] | The text of selected options. |
selectedIndices | number[] | 0-based indices of selected options. |
Accessibility
- Options use
role="group"with radio buttons (single) or checkboxes (multiple). - Result bars use
role="progressbar"witharia-valuenow. - Results area uses
aria-live="polite"for screen reader announcements. - The outer container uses
role="region"witharia-label.