Skip to content

Latest commit

 

History

History
51 lines (41 loc) · 1.94 KB

File metadata and controls

51 lines (41 loc) · 1.94 KB
pcx_content_type reference
title RtkButton
description API reference for RtkButton component (React Native Library)

A general-purpose button component with multiple variants and sizes.

Properties

Property Type Required Default Description
children ReactNode - Button content/label
onClick any - Press handler callback
kind 'button' | 'icon' | 'wide' 'button' Button kind
variant 'danger' | 'ghost' | 'primary' | 'secondary' - Visual style variant
size 'lg' | 'md' | 'sm' | 'xl' - Button size
reverse boolean false Reverse the button content order
disabled boolean - Whether the button is disabled
style StyleProp<any> - Custom React Native styles

Usage Examples

Basic Usage

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

function MyComponent() {
	return <RtkButton onClick={() => console.log("pressed")}>Press Me</RtkButton>;
}

With Properties

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

function MyComponent() {
	return (
		<RtkButton
			onClick={() => console.log("pressed")}
			variant="primary"
			size="md"
			kind="wide"
		>
			Join Meeting
		</RtkButton>
	);
}