Interface: ITerminalOptions

An object containing start up options for the terminal.






<Optional> allowTransparency

● allowTransparency: boolean

Defined in xterm.d.ts:32

Whether background should support non-opaque color. It must be set before executing open() method and can’t be changed later without excuting it again. Warning: Enabling this option can reduce performances somewhat.

<Optional> bellSound

● bellSound: string

Defined in xterm.d.ts:37

A data uri of the sound to use for the bell (needs bellStyle = ‘sound’).

<Optional> bellStyle

● bellStyle: “none” | “sound”

Defined in xterm.d.ts:42

The type of the bell notification the terminal will use.

<Optional> cols

● cols: number

Defined in xterm.d.ts:57

The number of columns in the terminal.

<Optional> convertEol

● convertEol: boolean

Defined in xterm.d.ts:52

When enabled the cursor will be set to the beginning of the next line with every new line. This 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:62

Whether the cursor blinks.

<Optional> cursorStyle

● cursorStyle: “block” | “underline” | “bar”

Defined in xterm.d.ts:67

The style of the cursor.

<Optional> disableStdin

● disableStdin: boolean

Defined in xterm.d.ts:72

Whether input should be disabled.

<Optional> drawBoldTextInBrightColors

● drawBoldTextInBrightColors: boolean

Defined in xterm.d.ts:77

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

<Optional> enableBold

● enableBold: boolean

Defined in xterm.d.ts:84

Whether to enable the rendering of bold text.

deprecated: Use fontWeight and fontWeightBold instead.

<Optional> experimentalCharAtlas

● experimentalCharAtlas: “none” | “static” | “dynamic”

Defined in xterm.d.ts:102

What character atlas implementation to use. The character atlas caches drawn characters, speeding up rendering significantly. However, it can introduce some minor rendering artifacts.

  • ‘none’: Don’t use an atlas.
  • ‘static’: Generate an atlas when the terminal starts or is reconfigured. This atlas will only contain ASCII characters in 16 colors.
  • ‘dynamic’: Generate an atlas using a LRU cache as characters are requested. Limited to ASCII characters (for now), but supports 256 colors. For characters covered by the static cache, it’s slightly slower in comparison, since there’s more overhead involved in managing the cache.

Currently defaults to ‘static’. This option may be removed in the future. If it is, passed parameters will be ignored.

<Optional> fontFamily

● fontFamily: string

Defined in xterm.d.ts:112

The font family used to render text.

<Optional> fontSize

● fontSize: number

Defined in xterm.d.ts:107

The font size used to render text.

<Optional> fontWeight

● fontWeight: FontWeight

Defined in xterm.d.ts:117

The font weight used to render non-bold text.

<Optional> fontWeightBold

● fontWeightBold: FontWeight

Defined in xterm.d.ts:122

The font weight used to render bold text.

<Optional> letterSpacing

● letterSpacing: number

Defined in xterm.d.ts:127

The spacing in whole pixels between characters..

<Optional> lineHeight

● lineHeight: number

Defined in xterm.d.ts:132

The line height used to render text.

<Optional> macOptionClickForcesSelection

● macOptionClickForcesSelection: boolean

Defined in xterm.d.ts:146

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:137

Whether to treat option as the meta key.

<Optional> rendererType

● rendererType: RendererType

Defined in xterm.d.ts:156

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:162

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:167

The number of rows in the terminal.

<Optional> screenReaderMode

● screenReaderMode: boolean

Defined in xterm.d.ts:174

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> scrollback

● scrollback: number

Defined in xterm.d.ts:180

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:185

The size of tab stops in the terminal.

<Optional> theme

● theme: ITheme

Defined in xterm.d.ts:190

The color theme of the terminal.

<Optional> windowsMode

● windowsMode: boolean

Defined in xterm.d.ts:202

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.