Referência de elementos
Elemento de texto
1. Estrutura
interface TextClip extends BaseClip {
type: "text";
text: string;
}2. Campos suportados
text
- Tipo:
string - Obrigatório: sim
- Finalidade: conteúdo de texto
Campos de estilo comuns
Mais usados com texto:
style.fontFamilystyle.fontSizestyle.fontWeightstyle.fontStylestyle.lineHeightstyle.letterSpacingstyle.textAlignstyle.textWrapstyle.fillstyle.strokestyle.strokeWidthstyle.shadowColorstyle.shadowBlurstyle.shadowOffset
3. Bons casos de uso
- Títulos
- Subtítulos
- Textos de CTA
- Blocos de copy em templates
- Contagens regressivas numéricas
- Textos de citação
4. Comportamento atual do runtime
- O suporte para estilos de texto é relativamente completo
animations,keyframesetransitionspodem ser aplicados por cima- O posicionamento é guiado principalmente por
transform.x / y
5. Exemplo
{
"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
}
]
}