Header menu logo fable-electron-docs-api

TouchBarLabel Type

⚠ Process Availability: Main ✔ | Renderer ❌ | Utility ❌ | Exported ❌

Create a label in the touch bar for native macOS applicationsProcess: Main This class is not exported from the 'electron' module. It is only available as a return value of other methods in the Electron API.

Constructors

Constructor Description

TouchBarLabel(?label, ?accessibilityLabel, ?textColor)

Full Usage: TouchBarLabel(?label, ?accessibilityLabel, ?textColor)

Parameters:
    ?label : string - Text to display.
    ?accessibilityLabel : string - A short description of the button for use by screenreaders like VoiceOver.
    ?textColor : string - Hex color of text, i.e #ABCDEF.

Returns: TouchBarLabel
?label : string

Text to display.

?accessibilityLabel : string

A short description of the button for use by screenreaders like VoiceOver.

?textColor : string

Hex color of text, i.e #ABCDEF.

Returns: TouchBarLabel

Instance members

Instance member Description

this.accessibilityLabel

Full Usage: this.accessibilityLabel

A string representing the description of the label to be read by a screen reader.

this.label

Full Usage: this.label

A string representing the label's current text. Changing this value immediately updates the label in the touch bar.

this.textColor

Full Usage: this.textColor

A string hex code representing the label's current text color. Changing this value immediately updates the label in the touch bar.

Type something to start searching.