Skip to main content

Overview

CometChatPollBubble renders a poll. It is self-extracting: pass the SDK custom message and the bubble derives the question, options, per-option vote counts, total votes, and the logged-in user’s selected option entirely from the message metadata. Selecting an option submits a vote; the bar fills and counts/avatars update.
Live Preview — interact with the poll bubble.Open in Storybook ↗

Usage


Props

message

The custom message containing poll data in its metadata. Drives all extraction. Required.

alignment

Override incoming/outgoing alignment. Defaults to sender-vs-logged-in-user.

disableInteraction

Disable all interaction (e.g. for a thread header preview).

onVoteSubmit

Callback when a vote is submitted successfully.

onVoteError

Callback when a vote submission fails.

className

Additional CSS class applied to the root element.

CSS Selectors


Next Steps

Polls Plugin

Plugin behavior, context menu, and conversation preview

Sticker Bubble

Render sticker messages

Message Bubble

The wrapper that hosts bubble content

Theming

Customize colors, fonts, and spacing