Skip to content

非公式本サイトは非公式の日本語ドキュメントであり、Cloudflare 公式サイトではありません。最新情報はdevelopers.cloudflare.comをご確認ください。

RtkSimpleGrid

最終更新 Markdown で表示Agent セットアップ

参加者タイルを行と列に並べ、参加者数に応じて自動でサイズを決めるシンプルなグリッドレイアウトです。

プロパティ

プロパティ 必須 デフォルト 説明
meeting RealtimeKitClient - RealtimeKit のミーティングインスタンス
participants Peer[] - 表示する参加者の配列
aspectRatio string '3:4' グリッドタイルのアスペクト比
config UIConfig defaultConfig UI 設定オブジェクト
gap number 8 グリッドタイル間のギャップ(ピクセル)
iconPack IconPack defaultIconPack カスタムアイコンパック
size 'lg' | 'md' | 'sm' | 'xl' 'sm' サイズのバリアント
states States - UI 状態オブジェクト
t RtkI18n - i18n 翻訳関数
style StyleProp<any> - グリッドコンテナのカスタムスタイル

使用例

基本的な使い方

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

function MyComponent() {
	return <RtkSimpleGrid meeting={meeting} participants={participants} />;
}

プロパティを指定する場合

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

function MyComponent() {
	return (
		<RtkSimpleGrid
			meeting={meeting}
			participants={participants}
			aspectRatio="16:9"
			gap={12}
			size="md"
		/>
	);
}

役に立ちましたか?