VideoFlowcodeGitHubTry itCoreRenderersReact Video EditorPlaygroundExamplesDocscodeGitHubTry it
Getting started
InstallationQuick startCore conceptsYour first video
Builder
Builder APITime formatsParallel & wait
Layers
TextImageVideoAudioCaptionsShapeGroups
Animation
Animate & keyframesEasing functionsTransitionsEffects
Renderers
Browser rendererServer rendererDOM preview
React Video Editor
QuickstartThemingUploadsCustom panelsHooks & commandsKeyboard shortcuts
API reference
Overview@videoflow/core@videoflow/renderer-browser@videoflow/renderer-server@videoflow/renderer-dom@videoflow/react-video-editor

Text layers

Text layers render a typographic element with full CSS-style control: font, weight, letter-spacing, alignment, background pill, padding, border-radius. Every property is animatable via .animate().

On this page
const $ = new VideoFlow({ width: 512, height: 512, fps: 30, backgroundColor: '#0f0f23' });

$.addText(
  {
    text: 'Design.\nAnimate.\nShip.',
    fontSize: 11,
    fontWeight: 800,
    color: '#ffffff',
    fontFamily: 'Inter',
    letterSpacing: '0.02em',
    lineHeight: 1.15,
    position: [0.5, 0.5],
    textAlign: 'center',
    backgroundColor: 'rgba(255, 90, 31, 0.15)',
    padding: '0.3em 0.6em',
    borderRadius: '16px',
  },
  { transitionIn: { transition: 'zoom', duration: '800ms', easing: 'easeOut' } },
);

$.wait('1.5s');
return $;
Compiling00:00

Properties

PropType / defaultNotes
textstringPlain or multiline. Supports \\n. Not animatable.
fontSizeem / 4Unitless = em (1em = 1% of project width).
fontWeight100–900 / 600Only weights the font actually ships are rendered.
fontFamilystring / Noto SansGoogle Fonts resolved automatically. Not animatable.
colorcss colour / #FFFFFFAny CSS colour.
letterSpacingem / 0emAnimatable.
lineHeightnumber / 1Multiplier of fontSize, or 'XXem' / 'XXpx'.
wordSpacing / textIndentem / 0Animatable.
textAlignleft | center | right | justify / centerNot animatable.
verticalAligntop | middle | bottom / middleNot animatable.
fontStylenormal | italic / normalNot animatable.
textTransformnone | capitalize | uppercase | lowercaseNot animatable.
textDecorationnone | underline | overline | line-throughNot animatable.
directionltr | rtl / ltrBidirectional text. Not animatable.
backgroundColorcss colour / transparentPill background; pairs well with padding.
paddingem / 0Single value or [t,r,b,l].
borderWidth / borderColor / borderStyleem / colour / enumborderStylenone | solid | dashed | dotted | double | groove | ridge | inset | outset.
borderRadiusem or 'XX%' / 0Single value or [tl,tr,br,bl].
boxShadow + boxShadowBlur / boxShadowColor / boxShadowOffset / boxShadowSpreadboolean + propsSet boxShadow: true to enable; props animatable.
outlineWidth / outlineStyle / outlineColor / outlineOffsetem + enumCSS outline. outlineStyle not animatable.
textShadow + textShadowBlur / textShadowColor / textShadowOffsetboolean + propsSet textShadow: true to enable; props animatable.
textStroke + textStrokeWidth / textStrokeColorboolean + propsSet textStroke: true to enable; props animatable.
position[x, y] / [0.5, 0.5]Normalised 0..1 coordinates of the anchor. Accepts [x, y, z].
anchor[x, y] / [0.5, 0.5]Pivot inside the layer bbox (for position + rotation + scale).
scalenumber | [sx, sy] | [sx, sy, sz] / 1Animatable.
rotationdegrees | [rx, ry, rz] / 0Animatable.
perspectiveem / 1003D perspective for child rotations / translations. Animatable.
opacity0–1 / 1Animatable.
visibleboolean / trueHard on/off (no interpolation).
blendMode16 values / normalMaps to CSS mix-blend-modenormal, multiply, screen, overlay, darken, lighten, color-dodge, color-burn, hard-light, soft-light, difference, exclusion, hue, saturation, color, luminosity. Not animatable.
filterBlur / filterBrightness / filterContrast / filterSaturate / filterGrayscale / filterSepia / filterInvert / filterHueRotateem / multiplier / 0–1 / degPer-layer CSS filter chain. All animatable.
effectsLayerEffect[]Creation-time only — see Effects. Individual params are animatable via dot-path keys.
startTime (setting)Time / current flow pointerSee Time formats.
sourceDuration (setting)TimeRarely needed — prefer the flow pattern (add → $.wait() → .remove()).

Kinetic typography

Give each layer its own transitionIn and space them with $.wait() for the classic "kinetic type" stagger — no manual keyframing required.

const $ = new VideoFlow({ width: 512, height: 512, fps: 30, backgroundColor: '#111' });

$.addText(
  {
    text: 'NOW AVAILABLE',
    fontSize: 4, fontWeight: 700, color: '#22c55e',
    letterSpacing: '0.3em', position: [0.5, 0.4],
  },
  { transitionIn: { transition: 'fade', duration: '600ms' } },
);

$.wait('150ms');

$.addText(
  {
    text: 'Videos\nas code.',
    fontSize: 14, fontWeight: 800, color: '#fff',
    lineHeight: 1.1, textAlign: 'center', position: [0.5, 0.58],
  },
  { transitionIn: { transition: 'slideUp', duration: '900ms', easing: 'easeOut' } },
);

$.wait('2s');
return $;
Compiling00:00
Fonts. Pass any Google Font name as fontFamily — the renderer fetches WOFF2 at render time. For local fonts, register them on the VideoFlow instance before adding the layer.
VideoFlow

Open-source toolkit for composing videos from code.

Product

CoreRenderersReact Video EditorPlayground

Learn

DocsAPI referenceExamplesvs. Remotionvs. FFmpeg

Project

GitHubLicenseContact

Legal

TermsPrivacy
© 2026 VideoFlow. Apache-2.0 core.