Skip to content

Options reference

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.

OptionPurposeDefault
appearanceFont, theme, cursor, backgroundOpacity, colorScheme, initial grid, and scrollback limitsNative Ghostty defaults
paddingCSS pixel insets (number or { top, right, bottom, left }) around the cell grid0
scrollbarOverlay scrollbar width, fade delay, and minimum thumb size, or false to disable it12 px overlay scrollbar
ligaturesOpt-in programming ligatures using the font’s GSUB tableOff
bidiOpt-in Unicode 13.0 bidirectional row reordering (lazy-loads bidi-js)false
textBlinkOpt-in SGR 5 and SGR 6 blinking text animationfalse
  • 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.

OptionEntryPurposeDefault
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'
rendererFactoryMainCustom renderer constructor bypassing built-in backend selectionBuilt-in selector
compositorAssetMainExplicit URL for canvas-compose.wasm pixel compositorPackage-relative asset
runtimeMainOwned WASM URLs ({ kind: 'owned', options: { wasm, bridge } }) or a shared { kind: 'borrowed', runtime }Creates an owned GhosttyRuntime
renderWhenOffscreenBothKeep painting while scrolled offscreen, clipped, or 0x0false
OptionEntryPurposeDefault
accessibilityBothScreen-reader text mirror and live-region config ({} to enable) or falseDisabled
keyboardBothSet false to disable built-in keyboard listenerstrue
linksBothLink activation handler and custom resolution optionsBuilt-in URL and OSC 8 handling
linkActivationModifierBothPredicate deciding when a click activates a link (for example e => e.metaKey)Unmodified click
clipboardWriteMainHost policy for OSC 52 clipboard writesDenied
copySelectionBothCustom clipboard writer for user selection copynavigator.clipboard.writeText
extensionsBothInitial native extensions (for example readline() from @ghostty-webgpu/line-editor)None
OptionEntryPurposeDefault
writeQueueBothCoalescing byte budgets and flush thresholds for writeBatched()Built-in defaults
outputTimingBothBurst thresholds (quietMs, inputWindowMs) for outputTiming telemetry100 ms / 2000 ms

Worker-only options (ghostty-webgpu/worker)

Section titled “Worker-only options (ghostty-webgpu/worker)”
OptionPurposeDefault
fontsRequired list of WorkerFontFace entries (url or Uint8Array bytes)Required
backend'auto', 'webgpu', or 'webgl''auto'
poolShared TerminalWorkerPool instanceDedicated worker per terminal
assetsCustom { wasm, bridge } URLsPackage-relative files
workerUrlCustom hosted worker script URLPackage worker entry