AI Integration Quick Reference
AI Integration Quick Reference
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.
Requires the Polls extension enabled in the CometChat Dashboard. Poll messages (
extension_poll) are only produced once the Polls extension is turned on for your app. Without it the composer cannot send polls and this bubble never renders. See the Polls guide to enable it, and the Plugins overview for how the UI Kit auto-routes poll messages to this bubble.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
Enable Polls (Dashboard)
Turn on the Polls extension that produces these messages
Sticker Bubble
Render sticker messages
Message Bubble
The wrapper that hosts bubble content
Theming
Customize colors, fonts, and spacing