OptionalallowWhether to allow the use of proposed API. When false, any usage of APIs marked as experimental/proposed will throw an error. The default is false.
OptionalallowWhether background should support non-opaque color. It must be set before
executing the Terminal.open() method and can't be changed later without
executing it again. Note that enabling this can negatively impact
performance.
OptionalaltIf enabled, alt + click will move the prompt cursor to position underneath the mouse. The default is true.
OptionalconvertWhen 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 settings of the underlying PTY (termios) deal 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.
OptionalcursorWhether the cursor blinks.
OptionalcursorThe style of the cursor when the terminal is not focused.
OptionalcursorThe style of the cursor when the terminal is focused.
OptionalcursorThe width of the cursor in CSS pixels when cursorStyle is set to 'bar'.
OptionalcustomWhether to draw custom glyphs for block element and box drawing characters instead of using the font. This should typically result in better rendering with continuous lines, even when line height and letter spacing is used. Note that this doesn't work with the DOM renderer which renders all characters using the font. The default is true.
OptionaldisableWhether input should be disabled.
OptionaldocumentA Document to use instead of the one that xterm.js was attached
to. The purpose of this is to improve support in multi-window
applications where HTML elements may be references across multiple
windows which can cause problems with instanceof.
The type is any because using Document can cause TS to have
performance/compiler problems.
OptionaldrawWhether to draw bold text in bright colors. The default is true.
OptionalfastThe scroll speed multiplier used for fast scrolling when Alt is held.
OptionalfontThe font family used to render text.
OptionalfontThe font size used to render text.
OptionalfontThe font weight used to render non-bold text.
OptionalfontThe font weight used to render bold text.
OptionalignoreWhether to ignore the bracketed paste mode. When true, this will always
paste without the \x1b[200~ and \x1b[201~ sequences, even when the
shell enables bracketed mode.
OptionalletterThe spacing in whole pixels between characters.
OptionallineThe line height used to render text.
OptionallinkThe handler for OSC 8 hyperlinks. Links will use the confirm browser
API with a strongly worded warning if no link handler is set.
When setting this, consider the security of users opening these links,
at a minimum there should be a tooltip or a prompt when hovering or
activating the link respectively. An example of what might be possible is
a terminal app writing link in the form javascript:... that runs some
javascript, a safe approach to prevent that is to validate the link
starts with http(s)://.
OptionalloggerA logger to use instead of console.
OptionallogWhat log level to use, this will log for all levels below and including what is set:
OptionalmacWhether 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.
OptionalmacWhether to treat option as the meta key.
OptionalminimumThe 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:
OptionaloverviewControls the visibility and style of the overview ruler which visualizes decorations underneath the scroll bar.
OptionalreflowWhether to reflow the line containing the cursor when the terminal is resized. Defaults to false, because shells usually handle this themselves.
OptionalrescaleWhether to rescale glyphs horizontally that are a single cell wide but have glyphs that would overlap following cell(s). This typically happens for ambiguous width characters (eg. the roman numeral characters U+2160+) which aren't featured in monospace fonts. This is an important feature for achieving GB18030 compliance.
The following glyphs will never be rescaled:
Note that this doesn't work with the DOM renderer. The default is false.
OptionalrightWhether to select the word under the cursor on right click, this is standard behavior in a lot of macOS applications.
OptionalscreenWhether screen reader support is enabled. When on this will expose supporting elements in the DOM to support NVDA on Windows and VoiceOver on macOS.
OptionalscrollbackThe amount of scrollback in the terminal. Scrollback is the amount of rows that are retained when lines are scrolled beyond the initial viewport. Defaults to 1000.
OptionalscrollIf enabled the Erase in Display All (ED2) escape sequence will push erased text to scrollback, instead of clearing only the viewport portion. This emulates PuTTY's default clear screen behavior.
OptionalscrollWhether to scroll to the bottom whenever there is some user input. The default is true.
OptionalscrollThe scrolling speed multiplier used for adjusting normal scrolling speed.
OptionalsmoothThe duration to smoothly scroll between the origin and the target in milliseconds. Set to 0 to disable smooth scrolling and scroll instantly.
OptionaltabThe size of tab stops in the terminal.
OptionalthemeThe color theme of the terminal.
OptionalwindowEnable various window manipulation and report features. All features are disabled by default for security reasons.
OptionalwindowsCompatibility information when the pty is known to be hosted on Windows. Setting this will turn on certain heuristics/workarounds depending on the values:
if (backend !== undefined || buildNumber !== undefined)
if !(backend === 'conpty' && buildNumber >= 21376)
OptionalwordA string containing all characters that are considered word separated by the double click to select work logic.
An object containing options for the terminal.