Black Lives Matter. Support the Equal Justice Initiative and read our statement here.

Electron Documentation

Class: TouchBarSpacer

Create a spacer between two items in the touch bar for native macOS applications

Process: Main

new TouchBarSpacer(options)

  • options Object
    • size String (optional) - Size of spacer, possible values are:
      • small - Small space between items. Maps to NSTouchBarItemIdentifierFixedSpaceSmall. This is the default.
      • large - Large space between items. Maps to NSTouchBarItemIdentifierFixedSpaceLarge.
      • flexible - Take up all available space. Maps to NSTouchBarItemIdentifierFlexibleSpace.

Instance Properties

The following properties are available on instances of TouchBarSpacer:

touchBarSpacer.size

A String representing the size of the spacer. Can be small, large or flexible.


Keyboard Shortcuts

Key Action
/ Focus the search bar
Esc Focus the search bar and cleans it
Select the next search result
Select the previous search result
Enter Open the selected search result
cmdEnter Ctrl+Enter Open the selected search result in a new tab