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
API reference

@videoflow/react-video-editor

Drop-in multi-track editor React component.

Functions

function

useEditor

(selector: (state: EditorState) => T): T

Subscribe to the entire editor state. Prefer the narrower hooks below.

Parameters
NameTypeDescription
selector(state: EditorState) => T
Returns
T
function

useHistoryState

(): { canRedo: boolean; canUndo: boolean }

Undo / redo availability.

Returns
{ canRedo: boolean; canUndo: boolean }
function

usePlayhead

(): { frame: number; playing: boolean }

Current timeline frame and playing flag.

Returns
{ frame: number; playing: boolean }
function

useSelection

(): { ids: string[]; layers: LayerJSON[] }

The selected layer ids and their resolved `LayerJSON` objects.

Returns
{ ids: string[]; layers: LayerJSON[] }
function

useVideo

(): VideoJSON

The currently-loaded `VideoJSON`.

Returns
VideoJSON
function

useViewport

(): Viewport

Timeline viewport (zoom / scroll).

Returns
Viewport
function

VideoEditor

(__namedParameters: VideoEditorProps): Element
Parameters
NameTypeDescription
__namedParametersVideoEditorProps
Returns
Element

Type aliases

type

EditorState

type EditorState = 
type

OnUploadCallback

Signature for the user-supplied asset upload callback. The editor calls this whenever a user drops a file into the preview or timeline (or picks one via the inspector). The default implementation just wraps the file in `URL.createObjectURL` so imports work locally out of the box; host apps that want persistent storage should override it.

type OnUploadCallback = (file: File) => Promise<string>
type

Selection

Editor-side selection state. Layer ids only — resolve to `LayerJSON` objects via `video.layers.find(...)` at the call site.

type Selection = 
type

VideoEditorProps

type VideoEditorProps = 
type

Viewport

Viewport state for the preview / timeline. Zoom and pan are editor-local (never persisted back into the VideoJSON).

type Viewport = 

Variables

const

useEditorStore

const useEditorStore: UseBoundStore<StoreApi<EditorState>>

On this page

FunctionsType aliasesVariables
VideoFlow

Open-source toolkit for composing videos from code.

Product

CoreRenderersReact Video EditorPlayground

Learn

DocsAPI referenceExamplesvs. Remotionvs. FFmpeg

Project

GitHubLicenseContactTermsPrivacy

From the blog

All posts →Beyond the Shell: Why Your Video Pipeline Should Be a TypeScript Library, Not an FFmpeg ScriptComponent-Driven Video: Mastering Layer Groups and CompositionHow to Build an In-App Video Editor with React and VideoFlowMastering GLSL Video Effects: Building Cinematic Pipelines with VideoFlowBuilding a YouTube Shorts Factory with VideoFlow and TypeScriptThe Three-Renderer Rule: Why Your Video Pipeline Needs a Single Source of TruthZero-Server Video Automation: Rendering MP4s in the Browser with WebCodecsProgrammatic Video Animation: A Deep Dive into VideoFlow Keyframes
© 2026 VideoFlow. Apache-2.0 core.