Skip to content

RtkPoll

Last updated View as MarkdownAgent setup

Renders a single poll with question, votable options, vote counts, and voter avatars.

Properties

Property Type Required Default Description
poll Poll - The poll object to display
meeting RealtimeKitClient - The RealtimeKit meeting instance
onRtkVotePoll any - Callback when a vote is cast (receives option index)
self string - Self user ID
iconPack IconPack defaultIconPack Custom icon pack
t RtkI18n - i18n translation function

Usage Examples

Basic Usage

import { RtkPoll } from "@cloudflare/realtimekit-react-native-ui";

function MyComponent() {
	return <RtkPoll poll={poll} meeting={meeting} />;
}

With Properties

import { RtkPoll } from "@cloudflare/realtimekit-react-native-ui";

function MyComponent() {
	return (
		<RtkPoll
			poll={poll}
			meeting={meeting}
			onRtkVotePoll={(index) => handleVote(index)}
			self={selfUserId}
		/>
	);
}

Was this helpful?