Reference

Telva Props Reference

Complete reference for Telva component props including UI toggles, document control, and extension points.

Telva Props Reference

TelvaProps extends callback interfaces (TVCallbacks) and adds component-level integration controls.

Core props

PropTypeDescription
idstringPersistence key and app identity. Changing it creates a new app instance.
documentTVDocumentLoads/updates document state from external source.
currentPageIdstringProgrammatically switches current page.
autofocusbooleanAuto-focus editor root on mount (default true).
readOnlybooleanEnables read-only interaction mode.
darkModebooleanForces dark mode setting at app level.
disableAssetsbooleanDisables image/video asset upload/usage.

UI visibility props

PropTypeDefault
showUIbooleantrue
showMenubooleantrue
showMultiplayerMenubooleantrue
showPagesbooleantrue
showToolsbooleantrue
showZoombooleantrue
showStylesbooleantrue

Notes

  • showUI={false} hides chrome while still rendering the drawing surface.
  • granular flags let you keep selected internal panels and replace others with host UI.

Rendering overrides

PropTypeDescription
components.CursorCursorComponentReplaces default multiplayer cursor renderer.
hideCursorsbooleanHides rendered user cursors.
reactComponentsReactComponentEntry[]Registry for insertable React components in the editor.

Fonts integration

PropTypeDescription
googleFontsApiKeystringEnables full Google Fonts listing in font picker.

Minimal controlled setup

import * as React from 'react'
import { TVDocument, Telva, TelvaApp } from 'telva'

export function Controlled({ doc }: { doc: TVDocument }) {
  const [localDoc, setLocalDoc] = React.useState(doc)

  const onChange = React.useCallback((app: TelvaApp) => {
    setLocalDoc(app.document)
  }, [])

  return (
    <Telva
      document={localDoc}
      onChange={onChange}
      showStyles={false}
      showMenu={false}
      showPages={false}
    />
  )
}

Behavior details

  • if document.id === app.document.id, Telva updates in place via updateDocument
  • if IDs differ, Telva performs a full loadDocument
  • callback objects are refreshed when callback props change

On this page