Skip to content

WebGpuTerminalRendererOptions

optional adapterPolicy?: "hardware" | "any"

Eligibility for initial built-in acquisition; custom device factories own their policy.


optional bidi?: boolean


canvas: HTMLCanvasElement | OffscreenCanvas


columns: number


optional compositorAsset?: string | URL

URL for the Canvas 2D pixel compositor. Defaults to the shipped SIMD/scalar pair.


optional cursorBlink?: boolean


optional deviceFactory?: () => Promise<GPUDevice>

Promise<GPUDevice>


optional deviceOwner?: DeviceOwner

Terminals sharing one owner share its device; overrides deviceFactory and adapterPolicy.


font: TerminalFittedFont


optional frameCoordinator?: FrameCoordinator

Terminals sharing one coordinator paint in one animation frame and one queue submit.


optional ligatures?: LigatureFinder

Joins programming ligatures in the primary font; absent keeps the per-cell path.


optional needsFrameRows?: () => boolean

Return false for cursor-only snapshots; row data resumes with the full viewport.

boolean


optional onCleanUpdate?: () => void

Called after a clean render-state update needs no painting or row notification.

void


optional onError?: (cause) => void

unknown

void


optional onFrame?: (snapshot) => void

RendererFrameSnapshot

void


optional onRowsChanged?: (rows) => void

Painted row IDs without requesting cell data.

readonly number[]

void


optional onRowsPainted?: (rows) => void

readonly RenderRow[]

void


optional onTextFrame?: (snapshot) => void

Owned row text with lazily decoded cell strings and continuation flags.

RendererTextFrameSnapshot

void


optional presentation?: TerminalPresentation

immediate prefers WebGL2 with a desynchronized canvas and paints writes without waiting for a frame.


optional reducedMotion?: boolean


optional rendererMode?: TerminalRendererMode


renderState: GhosttyRenderState | RenderStateSource


optional replaceCanvas?: () => HTMLCanvasElement | OffscreenCanvas

HTMLCanvasElement | OffscreenCanvas


optional replacementDeviceOwner?: DeviceOwner

Owner of devices that replace a lost one; defaults to deviceOwner.


optional retainDisplayedText?: boolean


rows: number


optional schedulerClock?: RenderSchedulerClock


optional textBlink?: boolean

Opt-in SGR 5/6 animation; native Ghostty renders this text steadily.


optional theme?: Partial<RendererTheme>