Interface: ITerminalOptions

An object containing start up options for the terminal.


  • ITerminalOptions




Optional allowProposedApi

allowProposedApi? : boolean

Defined in xterm.d.ts:37

Whether to allow the use of proposed API. When false, any usage of APIs marked as experimental/proposed will throw an error. This defaults to true currently, but will change to false in v5.0.

Optional allowTransparency

allowTransparency? : boolean

Defined in xterm.d.ts:45

Whether background should support non-opaque color. It must be set before executing the method and can’t be changed later without executing it again. Note that enabling this can negatively impact performance.

Optional altClickMovesCursor

altClickMovesCursor? : boolean

Defined in xterm.d.ts:51

If enabled, alt + click will move the prompt cursor to position underneath the mouse. The default is true.

Optional bellSound

bellSound? : string

Defined in xterm.d.ts:56

A data uri of the sound to use for the bell when bellStyle = 'sound'.

Optional bellStyle

bellStyle? : *“none” “sound”*

Defined in xterm.d.ts:61

The type of the bell notification the terminal will use.

Optional cols

cols? : number

Defined in xterm.d.ts:76

The number of columns in the terminal.

Optional convertEol

convertEol? : boolean

Defined in xterm.d.ts:71

When enabled the cursor will be set to the beginning of the next line with every new line. This is equivalent to sending ‘\r\n’ for each ‘\n’. Normally the termios settings of the underlying PTY deals with the translation of ‘\n’ to ‘\r\n’ and this setting should not be used. If you deal with data from a non-PTY related source, this settings might be useful.

cursorBlink? : boolean

Defined in xterm.d.ts:81

Whether the cursor blinks.

Optional cursorStyle

cursorStyle? : *“block” “underline” “bar”*

Defined in xterm.d.ts:86

The style of the cursor.

Optional cursorWidth

cursorWidth? : number

Defined in xterm.d.ts:91

The width of the cursor in CSS pixels when cursorStyle is set to ‘bar’.

Optional disableStdin

disableStdin? : boolean

Defined in xterm.d.ts:96

Whether input should be disabled.

Optional drawBoldTextInBrightColors

drawBoldTextInBrightColors? : boolean

Defined in xterm.d.ts:101

Whether to draw bold text in bright colors. The default is true.

Optional fastScrollModifier

fastScrollModifier? : *“alt” “ctrl” “shift” undefined*

Defined in xterm.d.ts:106

The modifier key hold to multiply scroll speed.

Optional fastScrollSensitivity

fastScrollSensitivity? : number

Defined in xterm.d.ts:111

The scroll speed multiplier used for fast scrolling.

Optional fontFamily

fontFamily? : string

Defined in xterm.d.ts:121

The font family used to render text.

Optional fontSize

fontSize? : number

Defined in xterm.d.ts:116

The font size used to render text.

Optional fontWeight

fontWeight? : FontWeight

Defined in xterm.d.ts:126

The font weight used to render non-bold text.

Optional fontWeightBold

fontWeightBold? : FontWeight

Defined in xterm.d.ts:131

The font weight used to render bold text.

Optional letterSpacing

letterSpacing? : number

Defined in xterm.d.ts:136

The spacing in whole pixels between characters.

Optional lineHeight

lineHeight? : number

Defined in xterm.d.ts:141

The line height used to render text.

Optional linkTooltipHoverDuration

linkTooltipHoverDuration? : number

Defined in xterm.d.ts:148

The duration in milliseconds before link tooltip events fire when hovering on a link.

deprecated This will be removed when the link matcher API is removed.

Optional logLevel

logLevel? : LogLevel

Defined in xterm.d.ts:160

What log level to use, this will log for all levels below and including what is set:

  1. debug
  2. info (default)
  3. warn
  4. error
  5. off

Optional macOptionClickForcesSelection

macOptionClickForcesSelection? : boolean

Defined in xterm.d.ts:174

Whether holding a modifier key will force normal selection behavior, regardless of whether the terminal is in mouse events mode. This will also prevent mouse events from being emitted by the terminal. For example, this allows you to use xterm.js’ regular selection inside tmux with mouse mode enabled.

Optional macOptionIsMeta

macOptionIsMeta? : boolean

Defined in xterm.d.ts:165

Whether to treat option as the meta key.

Optional minimumContrastRatio

minimumContrastRatio? : number

Defined in xterm.d.ts:186

The minimum contrast ratio for text in the terminal, setting this will change the foreground color dynamically depending on whether the contrast ratio is met. Example values:

  • 1: The default, do nothing.
  • 4.5: Minimum for WCAG AA compliance.
  • 7: Minimum for WCAG AAA compliance.
  • 21: White on black or black on white.

Optional rendererType

rendererType? : RendererType

Defined in xterm.d.ts:196

The type of renderer to use, this allows using the fallback DOM renderer when canvas is too slow for the environment. The following features do not work when the DOM renderer is used:

  • Letter spacing
  • Cursor blink

Optional rightClickSelectsWord

rightClickSelectsWord? : boolean

Defined in xterm.d.ts:202

Whether to select the word under the cursor on right click, this is standard behavior in a lot of macOS applications.

Optional rows

rows? : number

Defined in xterm.d.ts:207

The number of rows in the terminal.

Optional screenReaderMode

screenReaderMode? : boolean

Defined in xterm.d.ts:214

Whether screen reader support is enabled. When on this will expose supporting elements in the DOM to support NVDA on Windows and VoiceOver on macOS.

Optional scrollSensitivity

scrollSensitivity? : number

Defined in xterm.d.ts:226

The scrolling speed multiplier used for adjusting normal scrolling speed.

Optional scrollback

scrollback? : number

Defined in xterm.d.ts:221

The amount of scrollback in the terminal. Scrollback is the amount of rows that are retained when lines are scrolled beyond the initial viewport.

Optional tabStopWidth

tabStopWidth? : number

Defined in xterm.d.ts:231

The size of tab stops in the terminal.

Optional theme

theme? : ITheme

Defined in xterm.d.ts:236

The color theme of the terminal.

Optional windowOptions

windowOptions? : IWindowOptions

Defined in xterm.d.ts:260

Enable various window manipulation and report features. All features are disabled by default for security reasons.

Optional windowsMode

windowsMode? : boolean

Defined in xterm.d.ts:248

Whether “Windows mode” is enabled. Because Windows backends winpty and conpty operate by doing line wrapping on their side, xterm.js does not have access to wrapped lines. When Windows mode is enabled the following changes will be in effect:

  • Reflow is disabled.
  • Lines are assumed to be wrapped if the last character of the line is not whitespace.

Optional wordSeparator

wordSeparator? : string

Defined in xterm.d.ts:254

A string containing all characters that are considered word separated by the double click to select work logic.