# generaltranslation: General Translation Core SDK: JsxChildren URL: https://generaltranslation.com/ja/docs/core/types/jsx-children.mdx --- title: JsxChildren description: 翻訳してレンダリングできる JSX コンテンツの型定義 --- ## 概要 `JsxChildren` は、翻訳対象となるテキスト、要素、変数を含む JSX コンテンツを表します。 ```typescript type JsxChildren = JsxChild | JsxChild[]; ``` ## 構造 ```typescript type JsxChild = string | JsxElement | Variable; ``` | 種類 | 説明 | | ------------ | ----------- | | `string` | プレーンテキスト | | `JsxElement` | 構造化要素 | | `Variable` | 動的なプレースホルダー | ### JsxElement ```typescript type JsxElement = { t?: string; // タグ名 i?: number; // id d?: GTProp; // GTプロパティ c?: JsxChildren; // 子要素 }; ``` ## 例 ### 基本的な使い方 ```typescript copy import { JsxChildren, Variable } from 'generaltranslation'; // シンプルなテキスト const text: JsxChildren = "Welcome!"; // 変数を含むテキスト const greeting: JsxChildren = [ "Hello, ", { k: 'userName' } as Variable, "!" ]; ``` ### 構造化要素 ```typescript copy // div要素 const divElement: JsxChildren = { t: 'div', c: ['Content here'] }; // タイトル付きリンク const linkElement: JsxChildren = { t: 'a', d: { ti: 'Visit homepage' }, c: ['Click here'] }; ``` ## 関連する型 * [`JsxChild`](/docs/core/types/jsx-child) - 個々の子要素の型 * [`JsxElement`](/docs/core/types/jsx-element) - 構造化要素の定義