跳转到内容
搜索文档

RtkMenu

最后更新 查看 MarkdownAgent 设置

具有位置选项的菜单容器组件。

属性

属性 类型 必填 默认值 描述
children ReactNode - 菜单内容
size 'lg' | 'md' | 'sm' | 'xl' - 尺寸变体
placement 'bottom' | 'bottom-end' | 'bottom-start' | 'left' | 'left-end' | 'left-start' | 'right' | 'right-end' | 'right-start' | 'top' | 'top-end' | 'top-start' - 菜单相对于触发器的位置

使用示例

基本用法

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

function MyComponent() {
	return (
		<RtkMenu size="md" placement="bottom">
			<Text>Menu content</Text>
		</RtkMenu>
	);
}

带有属性

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

function MyComponent() {
	return (
		<RtkMenu size="lg" placement="bottom-start">
			<Text>Menu content</Text>
		</RtkMenu>
	);
}

这篇文档对您有帮助吗?