Skip to content

RtkNotification

Last updated View as MarkdownAgent setup

A single notification toast with slide-in/slide-out animation, avatar, message text, and dismiss button.

Properties

Property Type Required Default Description
notification Notification - Notification object with id, message, image, duration, and button
onRtkNotificationDismiss any - Callback when notification is dismissed
iconPack IconPack defaultIconPack Custom icon pack
size 'lg' | 'md' | 'sm' | 'xl' 'sm' Size variant
t RtkI18n - i18n translation function

Usage Examples

Basic Usage

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

function MyComponent() {
	return <RtkNotification notification={notification} />;
}

With Properties

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

function MyComponent() {
	return (
		<RtkNotification
			notification={notification}
			onRtkNotificationDismiss={(id) => handleDismiss(id)}
			size="md"
		/>
	);
}

Was this helpful?