Referencia de elementos
Elemento de texto
1. Estructura
interface TextClip extends BaseClip {
type: "text";
text: string;
}2. Campos compatibles
text
- Tipo:
string - Obligatorio: sí
- Propósito: contenido de texto
Campos de estilo comunes
Los más usados con texto:
style.fontFamilystyle.fontSizestyle.fontWeightstyle.fontStylestyle.lineHeightstyle.letterSpacingstyle.textAlignstyle.textWrapstyle.fillstyle.strokestyle.strokeWidthstyle.shadowColorstyle.shadowBlurstyle.shadowOffset
3. Casos de uso adecuados
- Titulares
- Subtítulos
- Textos CTA
- Bloques de copy en plantillas
- Cuenta regresiva numérica
- Textos de cita
4. Comportamiento actual del runtime
- El soporte de estilos de texto es relativamente completo
animations,keyframesytransitionspueden superponerse encima- El posicionamiento depende principalmente de
transform.x / y
5. Ejemplo
{
"type": "text",
"start": 1,
"duration": 3,
"text": "Launch Today",
"transform": {
"x": "50%",
"y": "20%"
},
"style": {
"fontSize": 64,
"fontWeight": 700,
"fill": "#ffffff",
"textAlign": "center",
"shadowColor": "#000000",
"shadowBlur": 20
},
"animations": [
{
"type": "slideIn",
"direction": "up",
"distance": 100,
"duration": 0.6
}
]
}