Skip to content

Text

The <Text> primitive places a text label at a given position. Control font size, weight, alignment, and color to add labels, titles, annotations, and axis markers to your scenes.

Hello Elucim
0.00s / 3.97s · F0
PropTypeDefaultDescription
xnumber0X coordinate of the text anchor point
ynumber0Y coordinate of the text baseline
contentstring (children)''The text to display
fillstring'currentColor'Text color
fontSizenumber16Font size in pixels
fontFamilystring'sans-serif'Font family
fontWeightstring | number'normal'Font weight (e.g. 'bold', 600)
textAnchor'start' | 'middle' | 'end''start'Horizontal alignment relative to x
opacitynumber1Opacity from 0 to 1
import { Player, Write, FadeIn, Text } from '@elucim/core';
<Player width={500} height={300} fps={30} durationInFrames={90}>
<Write duration={30}>
<Text x={250} y={80} fill="#6c5ce7" fontSize={32} textAnchor="middle" fontWeight="bold">
Hello Elucim
</Text>
</Write>
<FadeIn duration={20}>
<Text x={250} y={140} fill="#a29bfe" fontSize={16} textAnchor="middle">
Animate concepts. Illuminate understanding.
</Text>
</FadeIn>
</Player>