| 属性 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
config |
UIConfig |
❌ | createDefaultConfig() |
配置对象 |
iconPack |
IconPack |
❌ | defaultIconPack |
图标包 |
isPreview |
boolean |
✅ | - | 是否将图块用于预览 |
nameTagPosition |
| 'bottom-left' | 'bottom-right' | 'bottom-center' | 'top-left' | 'top-right' | 'top-center' |
✅ | - | 姓名标签的位置 |
participant |
Peer |
✅ | - | 参与者对象 |
size |
Size |
✅ | - | 大小 |
states |
States |
✅ | - | 状态对象 |
t |
RtkI18n |
❌ | useLanguage() |
语言 |
variant |
'solid' | 'gradient' |
✅ | - | 变体 |
import { RtkParticipantSetup } from '@cloudflare/realtimekit-react-ui';
function MyComponent() {
return <RtkParticipantSetup />;
}import { RtkParticipantSetup } from '@cloudflare/realtimekit-react-ui';
function MyComponent() {
return (
<RtkParticipantSetup
isPreview={true}
nameTagPosition={| 'bottom-left'
| 'bottom-right'
| 'bottom-center'
| 'top-left'
| 'top-right'
| 'top-center'}
participant={participant}
/>
);
}