# generaltranslation: General Translation Core SDK: JsxChildren URL: https://generaltranslation.com/es/docs/core/types/jsx-children.mdx --- title: JsxChildren description: Definición de tipo para contenido JSX que puede traducirse y renderizarse --- ## Resumen `JsxChildren` representa contenido JSX con texto, elementos y variables para su traducción. ```typescript type JsxChildren = JsxChild | JsxChild[]; ``` ## Estructura ```typescript type JsxChild = string | JsxElement | Variable; ``` | Tipo | Descripción | | ------------ | ----------------------------- | | `string` | Texto sin formato | | `JsxElement` | Elemento estructurado | | `Variable` | Marcador de posición dinámico | ### JsxElement ```typescript type JsxElement = { t?: string; // nombre de etiqueta i?: number; // id d?: GTProp; // propiedades de GT c?: JsxChildren; // elementos hijo }; ``` ## Ejemplos ### Uso básico ```typescript copy import { JsxChildren, Variable } from 'generaltranslation'; // Texto sencillo const text: JsxChildren = "Welcome!"; // Texto con variables const greeting: JsxChildren = [ "Hello, ", { k: 'userName' } as Variable, "!" ]; ``` ### Elementos estructurados ```typescript copy // Elemento div const divElement: JsxChildren = { t: 'div', c: ['Content here'] }; // Enlace con título const linkElement: JsxChildren = { t: 'a', d: { ti: 'Visit homepage' }, c: ['Click here'] }; ``` ## Tipos relacionados * [`JsxChild`](/docs/core/types/jsx-child) - Tipos individuales de elementos hijo * [`JsxElement`](/docs/core/types/jsx-element) - Definiciones de elementos estructurados