Interactive · Gutenberg

Interactive Poll block for WordPress

Clickable voting poll with animated results stored per visitor.

Get Blockenberg

Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.

Get Blockenberg

What it actually does

Clickable voting poll with animated results stored per visitor.

Inspector panels on this block: Question, Poll Options, Behaviour, Layout. Those titles come from index.js, not from a shared template.

Where to find it

Gutenberg inserter → Interactive → search “Interactive Poll” (block name `blockenberg/interactive-poll` in block.json). Style it in the sidebar after insert.

How to use Interactive Poll block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Interactive Poll”, insert it. Category: Interactive.
  3. Configure inspector controls that exist on this block. Open Question. Set “Question text”, “Show total votes”, “Option text”, “Initial votes (for preview)”.
  4. Check the published page. The view script reads HTML data attributes: data-allow-revote, data-animate, data-index, data-instance, data-show-before. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
Question textMultiline text field in the inspector. block.json default: What is your favourite option?. Saved as `question`.
Show total votesOn/off toggle in the inspector. On by default. Saved as `totalVotesLabel`.
Option textText field in the inspector.
Initial votes (for preview)Numeric range control in the inspector. Range 0–999.
Allow revotingOn/off toggle in the inspector. On by default. Saved as `allowRevote`.
Show results before votingOn/off toggle in the inspector. Off by default. Saved as `showResultsBefore`.
Animate result barsOn/off toggle in the inspector. On by default. Saved as `animateBars`.
Max width (px)Numeric range control in the inspector. Range 240–900. block.json default: 560. Saved as `maxWidth`.
Padding (px)Numeric range control in the inspector. Range 0–80. block.json default: 32. Saved as `wrapPadding`.
Border radius (px)Numeric range control in the inspector. Range 0–40. block.json default: 10. Saved as `borderRadius`.
Bar fill colorColor control in the inspector. block.json default: #6c3fb5. Saved as `barColor`.
Bar track colorColor control in the inspector. block.json default: #ede9fe. Saved as `barBg`.
Button backgroundColor control in the inspector. block.json default: #6c3fb5. Saved as `buttonBg`.
Button text colorColor control in the inspector. block.json default: #ffffff. Saved as `buttonColor`.
Question colorColor control in the inspector. Saved as `questionColor`.
Result text colorColor control in the inspector. Saved as `resultTextColor`.
Card backgroundColor control in the inspector. Saved as `wrapBg`.
Card border colorColor control in the inspector. Saved as `wrapBorder`.

What the front-end script actually does

When this is the right block

Notes from the implementation

viewScript: this folder’s frontend.js is enqueued on the front end for this block.

FAQ

How do I add the Interactive Poll block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Interactive Poll”. It sits under Interactive. After insert, open Question and set “Question text”, “Show total votes”, “Option text”, “Initial votes (for preview)”.

Does Interactive Poll need a server or extra plugin?

No. After Blockenberg is active, the view script runs in the browser with the values you saved on the block.

Is the Interactive Poll Gutenberg block free?

Yes. Interactive Poll ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style Interactive Poll to match my theme?

Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Question, Poll Options, Behaviour, Layout).

Related interactive blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Interactive Poll from the Gutenberg inserter.

Get Blockenberg