Pass options to Terminal.create(options). The main entry (ghostty-webgpu) accepts GhosttyWebGpuTerminalOptions; ghostty-webgpu/worker accepts WorkerTerminalOptions. For full TypeScript signatures of every nested type and method, see the generated Main API and Worker API pages in the sidebar.
Options controlling visual styling, grid geometry, padding, and scrollbars. Available on both entries.
Option Purpose Default appearanceFont, theme, cursor, backgroundOpacity, colorScheme, initial grid, and scrollback limits Native Ghostty defaults paddingCSS pixel insets (number or { top, right, bottom, left }) around the cell grid 0scrollbarOverlay scrollbar width, fade delay, and minimum thumb size, or false to disable it 12 px overlay scrollbarligaturesOpt-in programming ligatures using the font’s GSUB table Off bidiOpt-in Unicode 13.0 bidirectional row reordering (lazy-loads bidi-js) falsetextBlinkOpt-in SGR 5 and SGR 6 blinking text animation false
font: { family, size, lineHeight, letterSpacing, weight, boldWeight } (see Fonts & grid sizing ).
theme: { foreground, background, cursor, cursorText?, selectionForeground, selectionBackground, minimumContrast, palette } (256 RGB entries; see Themes & Ghostty config ).
cursor: { style: 'block' | 'bar' | 'underline' | 'outline', blink: boolean }.
backgroundOpacity: number in [0, 1], default 1.
colorScheme: 'dark' | 'light'.
scrollbackLimit / scrollbackByteLimit: row and page-memory retention budgets (see Scrollback & history ).
grid: { columns, rows, cellWidth, cellHeight, pixelRatio } (auto-fitted synchronously during open() when the host container has nonzero size).
Options controlling renderer backend selection, presentation scheduling, and WASM asset loading.
Option Entry Purpose Default rendererModeMain 'auto', 'webgpu', 'webgl2', 'canvas2d-fill-text', or 'canvas2d-pixels''auto' (Canvas-first GPU startup)presentationMain 'frame' (rAF-scheduled, Canvas-first GPU startup) or 'immediate' (low-latency desynchronized)'frame'rendererFactoryMain Custom renderer constructor bypassing built-in backend selection Built-in selector compositorAssetMain Explicit URL for canvas-compose.wasm pixel compositor Package-relative asset runtimeMain Owned WASM URLs ({ kind: 'owned', options: { wasm, bridge } }) or a shared { kind: 'borrowed', runtime } Creates an owned GhosttyRuntime renderWhenOffscreenBoth Keep painting while scrolled offscreen, clipped, or 0x0 false
Offscreen and background-tab pausing
Both entries pause painting when document.visibilityState === 'hidden'. With the default
renderWhenOffscreen: false, an IntersectionObserver also pauses painting when the host is
scrolled out of view or clipped to zero area. Parsing, scrollback, and resize tracking keep
running, and one catch-up frame paints as soon as the terminal becomes visible again.
Option Entry Purpose Default accessibilityBoth Screen-reader text mirror and live-region config ({} to enable) or false Disabled keyboardBoth Set false to disable built-in keyboard listeners truelinksBoth Link activation handler and custom resolution options Built-in URL and OSC 8 handling linkActivationModifierBoth Predicate deciding when a click activates a link (for example e => e.metaKey) Unmodified click clipboardWriteMain Host policy for OSC 52 clipboard writes Denied copySelectionBoth Custom clipboard writer for user selection copy navigator.clipboard.writeTextextensionsBoth Initial native extensions (for example readline() from @ghostty-webgpu/line-editor) None
Option Entry Purpose Default writeQueueBoth Coalescing byte budgets and flush thresholds for writeBatched() Built-in defaults outputTimingBoth Burst thresholds (quietMs, inputWindowMs) for outputTiming telemetry 100 ms / 2000 ms
Option Purpose Default fontsRequired list of WorkerFontFace entries (url or Uint8Array bytes) Required backend'auto', 'webgpu', or 'webgl''auto'poolShared TerminalWorkerPool instance Dedicated worker per terminal assetsCustom { wasm, bridge } URLs Package-relative files workerUrlCustom hosted worker script URL Package worker entry
Pitfall: main-only options in worker mode
rendererMode: 'canvas2d-*', presentation: 'immediate', compositorAsset, and
rendererFactory exist only on the main entry. Passing them or calling main-only methods like
connectInput() in worker mode throws a TerminalWorkerError with code: 'capability'.