| 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.
| 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 |
import { RtkButton } from "@cloudflare/realtimekit-react-native-ui";
function MyComponent() {
return <RtkButton onClick={() => console.log("pressed")}>Press Me</RtkButton>;
}
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>
);
}