al) 
    * ` escapeItem ` ( [ TouchBarButton ](/docs/latest/api/touch-bar-button) | [ TouchBarColorPicker ](/docs/latest/api/touch-bar-color-picker) | [ TouchBarGroup ](/docs/latest/api/touch-bar-group) | [ TouchBarLabel ](/docs/latest/api/touch-bar-label) | [ TouchBarPopover ](/docs/latest/api/touch-bar-popover) | [ TouchBarScrubber ](/docs/latest/api/touch-bar-scrubber) | [ TouchBarSegmentedControl ](/docs/latest/api/touch-bar-segmented-control) | [ TouchBarSlider ](/docs/latest/api/touch-bar-slider) | [ TouchBarSpacer ](/docs/latest/api/touch-bar-spacer) | null) (optional) 

Creates a new touch bar with the specified items. Use `
BrowserWindow.setTouchBar ` to add the ` TouchBar ` to a window.

**Note:** The TouchBar API is currently experimental and may change or be
removed in future Electron releases.

**Tip:** If you don't have a MacBook with Touch Bar, you can use [ Touch Bar
Simulator ](https://github.com/sindresorhus/touch-bar-simulator) to test Touch
Bar usage in your app.

###  Static Properties  â

####  ` TouchBarButton ` â

A [ ` typeof TouchBarButton ` ](/docs/latest/api/touch-bar-button) reference
to the ` TouchBarButton ` class.

####  ` TouchBarColorPicker ` â

A [ ` typeof TouchBarColorPicker ` ](/docs/latest/api/touch-bar-color-picker)
reference to the ` TouchBarColorPicker ` class.

####  ` TouchBarGroup ` â

A [ ` typeof TouchBarGroup ` ](/docs/latest/api/touch-bar-group) reference to
the ` TouchBarGroup ` class.

####  ` TouchBarLabel ` â

A [ ` typeof TouchBarLabel ` ](/docs/latest/api/touch-bar-label) reference to
the ` TouchBarLabel ` class.

####  ` TouchBarPopover ` â

A [ ` typeof TouchBarPopover ` ](/docs/latest/api/touch-bar-popover) reference
to the ` TouchBarPopover ` class.

####  ` TouchBarScrubber ` â

A [ ` typeof TouchBarScrubber ` ](/docs/latest/api/touch-bar-scrubber)
reference to the ` TouchBarScrubber ` class.

####  ` TouchBarSegmentedControl ` â

A [ ` typeof TouchBarSegmentedControl ` ](/docs/latest/api/touch-bar-
segmented-control) reference to the ` TouchBarSegmentedControl ` class.

####  ` TouchBarSlider ` â

A [ ` typeof TouchBarSlider ` ](/docs/latest/api/touch-bar-slider) reference
to the ` TouchBarSlider ` class.

####  ` TouchBarSpacer ` â

A [ ` typeof TouchBarSpacer ` ](/docs/latest/api/touch-bar-spacer) reference
to the ` TouchBarSpacer ` class.

####  ` TouchBarOtherItemsProxy ` â

A [ ` typeof TouchBarOtherItemsProxy ` ](/docs/latest/api/touch-bar-other-
items-proxy) reference to the ` TouchBarOtherItemsProxy ` class.

###  Instance Properties  â

The following properties are available on instances of ` TouchBar ` :

####  ` touchBar.escapeItem ` â

A ` TouchBarItem ` that will replace the "esc" button on the touch bar when
set. Setting to ` null ` restores the default "esc" button. Changing this
value immediately updates the escape item in the touch bar.

##  Examples  â

Below is an example of a simple slot machine touch bar game with a button and
some labels.

    
    
    const { app, BrowserWindow, TouchBar } = require('electron')  
      
    const { TouchBarLabel, TouchBarButton, TouchBarSpacer } = TouchBar  
      
    let spinning = false  
      
    // Reel labels  
    const reel1 = new TouchBarLabel({ label: '' })  
    const reel2 = new TouchBarLabel({ label: '' })  
    const reel3 = new TouchBarLabel({ label: '' })  
      
    // Spin result label  
    const result = new TouchBarLabel({ label: '' })  
      
    // Spin button  
    const spin = new TouchBarButton({  
      label: 'ð° Spin',  
      backgroundColor: '#7851A9',  
      click: () => {  
        // Ignore clicks if already spinning  
        if (spinning) {  
          return  
        }  
      
        spinning = true  
        result.label = ''  
      
        let timeout = 10  
        const spinLength = 4 * 1000 // 4 seconds  
        const startTime = Date.now()  
      
        const spinReels = () => {  
          updateReels()  
      
          i