Skip to content

RtkPollForm

Last updated View as MarkdownAgent setup

Form for creating a new poll with question, dynamic options, anonymous voting, and hide results toggles.

Properties

Property Type Required Default Description
iconPack IconPack defaultIconPack Custom icon pack
t RtkI18n - i18n translation function
onRtkCreatePoll any - Callback when poll is created (receives question, options, anonymous, hideVotes)

Usage Examples

Basic Usage

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

function MyComponent() {
	return <RtkPollForm onRtkCreatePoll={(data) => handleCreatePoll(data)} />;
}

With Properties

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

function MyComponent() {
	return (
		<RtkPollForm
			onRtkCreatePoll={(data) => handleCreatePoll(data)}
			iconPack={customIconPack}
		/>
	);
}

Was this helpful?