Skip to main content

[ ![Electron homepage](/assets/img/logo.svg) ![Electron
homepage](/assets/img/logo.svg) **Electron** ](/) [ Docs ](/docs/latest/) [
API ](/docs/latest/api/app) [ Blog ](/blog)

Tools

  * [ Electron Forge ](https://electronforge.io)
  * [ Electron Fiddle ](/fiddle)

Community

  * [ Governance ](/governance)
  * [ Showcase ](/apps)
  * [ Resources ](/community)

[ Releases  ](https://releases.electronjs.org) [ GitHub
](https://github.com/electron/electron)

English

  * [ English ](/docs/latest/api/touch-bar)
  * [ Deutsch ](/de/docs/latest/api/touch-bar)
  * [ EspaÃ±ol ](/es/docs/latest/api/touch-bar)
  * [ FranÃ§ais ](/fr/docs/latest/api/touch-bar)
  * [ æ¥æ¬èª ](/ja/docs/latest/api/touch-bar)
  * [ PortuguÃªs ](/pt/docs/latest/api/touch-bar)
  * [ Ð ÑÑÑÐºÐ¸Ð¹ ](/ru/docs/latest/api/touch-bar)
  * [ ä¸­æ ](/zh/docs/latest/api/touch-bar)

Search

  * [ Main Process Modules ](/docs/latest/api/app)

    * [ app ](/docs/latest/api/app)
    * [ autoUpdater ](/docs/latest/api/auto-updater)
    * [ BrowserView ](/docs/latest/api/browser-view)
    * [ BrowserWindow ](/docs/latest/api/browser-window)
    * [ clipboard ](/docs/latest/api/clipboard)
    * [ contentTracing ](/docs/latest/api/content-tracing)
    * [ crashReporter ](/docs/latest/api/crash-reporter)
    * [ desktopCapturer ](/docs/latest/api/desktop-capturer)
    * [ dialog ](/docs/latest/api/dialog)
    * [ globalShortcut ](/docs/latest/api/global-shortcut)
    * [ inAppPurchase ](/docs/latest/api/in-app-purchase)
    * [ ipcMain ](/docs/latest/api/ipc-main)
    * [ Menu ](/docs/latest/api/menu)
    * [ MessageChannelMain ](/docs/latest/api/message-channel-main)
    * [ MessagePortMain ](/docs/latest/api/message-port-main)
    * [ nativeImage ](/docs/latest/api/native-image)
    * [ nativeTheme ](/docs/latest/api/native-theme)
    * [ net ](/docs/latest/api/net)
    * [ netLog ](/docs/latest/api/net-log)
    * [ Notification ](/docs/latest/api/notification)
    * [ parentPort ](/docs/latest/api/parent-port)
    * [ powerMonitor ](/docs/latest/api/power-monitor)
    * [ powerSaveBlocker ](/docs/latest/api/power-save-blocker)
    * [ process ](/docs/latest/api/process)
    * [ protocol ](/docs/latest/api/protocol)
    * [ pushNotifications ](/docs/latest/api/push-notifications)
    * [ safeStorage ](/docs/latest/api/safe-storage)
    * [ screen ](/docs/latest/api/screen)
    * [ session ](/docs/latest/api/session)
    * [ ShareMenu ](/docs/latest/api/share-menu)
    * [ shell ](/docs/latest/api/shell)
    * [ systemPreferences ](/docs/latest/api/system-preferences)
    * [ TouchBar ](/docs/latest/api/touch-bar)
    * [ Tray ](/docs/latest/api/tray)
    * [ utilityProcess ](/docs/latest/api/utility-process)
    * [ webContents ](/docs/latest/api/web-contents)
    * [ webFrameMain ](/docs/latest/api/web-frame-main)
  * [ Renderer Process Modules ](/docs/latest/api/clipboard)

  * [ Custom DOM Elements ](/docs/latest/api/file-object)

  * [ Chromium and Node.js ](/docs/latest/api/command-line-switches)

  * [ Classes ](/docs/latest/api/client-request)

  * [ API Structures ](/docs/latest/api/structures/bluetooth-device)

  * [ ](/)
  * Main Process Modules 
  * TouchBar 

On this page

#  TouchBar

##  Class: TouchBar  â

> Create TouchBar layouts for native macOS applications

Process: [ Main ](/docs/latest/glossary#main-process)

###  ` new TouchBar(options) ` â

  * ` options ` Object 
    * ` items ` ( [ 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) )[] (option