
Word translation pair
@opus-motion-library/word-translation-pair
From Opus Motion Library
A language lesson: a word in the first language rolls away letter by letter while its translation rolls in, the language chips swap highlight, and a pronunciation line with a speaker icon sweeps in. Cycles through any number of word pairs.
Install
node cli/mgl.mjs add word-translation-pair --to <your-project>/srcWhen to use
- Good for
- Language-learning reels, vocabulary-of-the-day posts, travel phrase videos, bilingual kids' content and app promos — pass your own pairs (word, translation, pronunciation) and the two language names.
Specs
- Length
- 380f · 12.7s
- Length type
- Fixed
- FPS
- 30
- License
- MIT
Props (11)
pairsarray= [{"from":"Hello","to":"Hola","pron":"OH-lah"},{"from":"Thank you","to":"Gracias","pron":"GRAH-see-ahs"},{"from":"Frie…array of {from, to, pron}: source word, translation, pronunciation respelling (empty pron hides the line)
fromLangstring= "English"name of the source language (left chip)
toLangstring= "Español"name of the target language (right chip)
backgroundstring= "#16213E"backdrop colour or 'transparent'
inkstring= "#F4F1E8"source word and chip text colour
accentstring= "#FF8A5B"translated word and active chip colour
accent2string= "#5BD1D7"underline, arrow and pronunciation sweep colour
fontFamilystring= ""optional CSS font-family for the words (empty = grotesk); set one that supports your script
pairFramesnumber= 120frames each word pair stays on screen
startAtnumber= 0frame the lesson starts
speednumber= 1playback speed multiplier