gespenst API - v0.1.0
    Preparing search index...

    Interface TerminalOptions

    Options used to create a browser terminal.

    Browser geometry is measured from the host and active font unless both cols and rows are supplied. The host must have a nonzero width and height.

    interface TerminalOptions {
        accessibility?: "off" | "basic" | "full";
        allowTransparency?: boolean;
        ariaLabel?: string;
        callbacksWasm?:
            | string
            | URL
            | ArrayBuffer
            | Uint8Array<ArrayBufferLike>
            | Module;
        cellHeightPx?: number;
        cellWidthPx?: number;
        cols?: number;
        container?: HTMLElement;
        defaultCursorBlink?: boolean;
        defaultCursorStyle?: CursorStyle;
        documentOverride?: Document;
        fontFamily?: string;
        fontSizePx?: number;
        fontWeight?: string | number;
        fontWeightBold?: string | number;
        letterSpacingPx?: number;
        lineHeight?: number;
        minimumContrastRatio?: number;
        renderer?: RendererPreference;
        rows?: number;
        scrollbackLines?: number;
        theme?: TerminalTheme;
        wasm?: string | URL | ArrayBuffer | Uint8Array<ArrayBufferLike> | Module;
        worker?: boolean | "dedicated" | "shared";
    }

    Hierarchy (View Summary)

    Index
    accessibility?: "off" | "basic" | "full"

    Accessibility mirror level.

    'full' mirrors visible viewport text from the rendering context into a live DOM log. Use it when the product requires that assistive-technology surface and include its update cost in performance testing.

    'basic'

    allowTransparency?: boolean

    Enables alpha in terminal theme colors and rendering surfaces.

    false

    ariaLabel?: string

    'Terminal'

    callbacksWasm?:
        | string
        | URL
        | ArrayBuffer
        | Uint8Array<ArrayBufferLike>
        | Module

    Browser-compatible callback bridge WASM source.

    The ghostty-callbacks.wasm URL derived from the package entry point.

    cellHeightPx?: number

    18 in the headless runtime.

    cellWidthPx?: number

    9 in the headless runtime.

    cols?: number

    80

    container?: HTMLElement

    Host element. It may also be supplied later through BrowserTerminal.open.

    defaultCursorBlink?: boolean

    Whether the default cursor blinks.

    false

    defaultCursorStyle?: CursorStyle

    Default cursor shape used until an application changes it.

    'block'

    documentOverride?: Document

    Document used for DOM, font, and measurement work. Defaults to the global document.

    fontFamily?: string

    CSS font-family stack used for measurement and rendering.

    'ui-monospace, SFMono-Regular, Menlo, Consolas, monospace'

    fontSizePx?: number

    14 CSS pixels.

    fontWeight?: string | number

    400

    fontWeightBold?: string | number

    700

    letterSpacingPx?: number

    0 CSS pixels.

    lineHeight?: number

    1.25 times the font size.

    minimumContrastRatio?: number

    Minimum WCAG contrast ratio applied to rendered text.

    1

    Preferred renderer with automatic fallback.

    'auto', which tries WebGPU, WebGL2, then Canvas 2D.

    rows?: number

    24

    scrollbackLines?: number

    10000

    DEFAULT_THEME

    wasm?: string | URL | ArrayBuffer | Uint8Array<ArrayBufferLike> | Module

    Browser-compatible Ghostty VT WASM source.

    The ghostty-vt.wasm URL derived from the package entry point.

    worker?: boolean | "dedicated" | "shared"

    Worker policy: main thread, dedicated worker, or shared worker.

    A dedicated worker when Worker and OffscreenCanvas are supported, otherwise the main thread. true is equivalent to 'dedicated'.