一个网格组件,渲染两个参与者列表:pinnedParticipants 和 participants。
你可以将布局自定义为 column 视图,默认是 row。
- 来自
pinnedParticipants[]的参与者会渲染在较大的网格中。 - 来自
participants[]数组的参与者会渲染在较小的网格中。
| 属性 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
aspectRatio |
string |
✅ | - | 参与者卡片的纵横比 格式:width:height |
config |
UIConfig |
❌ | createDefaultConfig() |
UI 配置 |
gap |
number |
✅ | - | 参与者卡片之间的间距 |
gridSize |
GridSize1 |
✅ | - | 网格大小 |
iconPack |
IconPack |
❌ | defaultIconPack |
图标包 |
layout |
GridLayout1 |
✅ | - | 网格布局 |
meeting |
Meeting |
✅ | - | Meeting 对象 |
participants |
Peer[] |
✅ | - | 参与者 |
pinnedParticipants |
Peer[] |
✅ | - | 固定的参与者 |
size |
Size |
✅ | - | 尺寸 |
states |
States |
✅ | - | States 对象 |
t |
RtkI18n |
❌ | useLanguage() |
语言 |
import { RtkSpotlightGrid } from '@cloudflare/realtimekit-react-ui';
function MyComponent() {
return <RtkSpotlightGrid />;
}import { RtkSpotlightGrid } from '@cloudflare/realtimekit-react-ui';
function MyComponent() {
return (
<RtkSpotlightGrid
aspectRatio="example"
gap={42}
gridSize="md"
/>
);
}