# generaltranslation: General Translation Core SDK: JsxChildren URL: https://generaltranslation.com/ru/docs/core/types/jsx-children.mdx --- title: JsxChildren description: Определение типа для JSX-контента, который можно переводить и отображать --- ## Обзор `JsxChildren` представляет собой JSX-содержимое с текстом, элементами и переменными для перевода. ```typescript type JsxChildren = JsxChild | JsxChild[]; ``` ## Структура ```typescript type JsxChild = string | JsxElement | Variable; ``` | Type | Описание | | ------------ | ------------------------- | | `string` | Простой текст | | `JsxElement` | Структурированный элемент | | `Variable` | Динамический заполнитель | ### JsxElement ```typescript type JsxElement = { t?: string; // имя тега i?: number; // идентификатор 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) - Описания структурированных элементов