<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.2 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTouchBarItem",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTouchBarItem"
  },
  "title" : "NSTouchBarItem"
}
-->

# NSTouchBarItem

A UI control shown in the Touch Bar on supported models of MacBook Pro.

```
@MainActor class NSTouchBarItem
```

## Overview

An instance of the [`NSTouchBarItem`](/documentation/AppKit/NSTouchBarItem) class is called an *item*. It appears to the user on the Touch Bar, typically along with other items, within the (invisible) bounds of the view for an [`NSTouchBar`](/documentation/AppKit/NSTouchBar) object, called a *bar*.

You use an item by adding it or its identifier to one or another of a bar’s arrays, depending on your app’s architecture and on the user customization you want to support. Because of the close interaction between bars and items, be sure you have read the overview for the [`NSTouchBar`](/documentation/AppKit/NSTouchBar) class before continuing here to learn about items.

AppKit provides a rich set of subclasses of [`NSTouchBarItem`](/documentation/AppKit/NSTouchBarItem), each of which is described in the corresponding class reference document:

- An [`NSCandidateListTouchBarItem`](/documentation/AppKit/NSCandidateListTouchBarItem) object (a *candidate-list item*), along with its delegate, provides a list of textual suggestions for the current text view
- An [`NSColorPickerTouchBarItem`](/documentation/AppKit/NSColorPickerTouchBarItem) object (a *color picker item*) provides a system-defined color picker
- An [`NSCustomTouchBarItem`](/documentation/AppKit/NSCustomTouchBarItem) object (a *custom item*) contains a responder of your choice, such as a view, a button, or a scrubber (an instance of the [`NSScrubber`](/documentation/AppKit/NSScrubber) class)
- An [`NSGroupTouchBarItem`](/documentation/AppKit/NSGroupTouchBarItem) object (a *group item*) provides a bar to contain other items
- An [`NSPopoverTouchBarItem`](/documentation/AppKit/NSPopoverTouchBarItem) object (a *popover item*) provides a two-state control that, when touched or pressed, expands into its second state, showing the contents of a bar it owns
- An [`NSSharingServicePickerTouchBarItem`](/documentation/AppKit/NSSharingServicePickerTouchBarItem) object (a *sharing service picker item*), along with its delegate, provides a list of objects eligible for sharing
- An [`NSSliderTouchBarItem`](/documentation/AppKit/NSSliderTouchBarItem) object (a *slider item*) provides a slider control for choosing a value in a range

The two most commonly-used item classes are [`NSCustomTouchBarItem`](/documentation/AppKit/NSCustomTouchBarItem) and [`NSPopoverTouchBarItem`](/documentation/AppKit/NSPopoverTouchBarItem).

Refer to the following sample code projects which demonstrate how to use [`NSTouchBarItem`](/documentation/AppKit/NSTouchBarItem) and related classes:

- [Creating and Customizing the Touch Bar](/documentation/AppKit/creating-and-customizing-the-touch-bar)
- [Integrating a Toolbar and Touch Bar into Your App](/documentation/AppKit/integrating-a-toolbar-and-touch-bar-into-your-app)

### Custom items

You typically use a *custom item* (an instance of the [`NSCustomTouchBarItem`](/documentation/AppKit/NSCustomTouchBarItem) class) to hold a view. For example, to place a button in the Touch Bar, proceed as follows:

1. Use an [`NSButton`](/documentation/AppKit/NSButton) convenience initializer such as [`init(title:image:target:action:)`](/documentation/AppKit/NSButton/init(title:image:target:action:)) to create and configure the button.
2. Set the [`view`](/documentation/AppKit/NSTouchBarItem/view) property for a custom item to point to the new button.

> Note:
> When you create custom items, it’s important to use convenience initializers, available starting in macOS 10.12, for the ``doc://com.apple.appkit/documentation/AppKit/NSButton``, ``doc://com.apple.appkit/documentation/AppKit/NSSegmentedControl``, and ``doc://com.apple.appkit/documentation/AppKit/NSSlider`` classes. These initializers take care of sizing their controls correctly for the Touch Bar, and they configure appearance appropriately for the Touch Bar. If you don’t use the convenience initializers, it’s your app’s responsibility to ensure correct sizing and appearance.

### Popover items

A *popover item* (an instance of the [`NSPopoverTouchBarItem`](/documentation/AppKit/NSPopoverTouchBarItem) class) — the second commonly-used type — lets you provide a new bar (an [`NSTouchBar`](/documentation/AppKit/NSTouchBar) object) when a user taps, or presses-and-holds, on the collapsed representation of the popover item.

In its expanded state, a popover appears as an overlay above other items in the Touch Bar.

To show a bar when a user taps a popover item, specify a bar in the item’s [`popoverTouchBar`](/documentation/AppKit/NSPopoverTouchBarItem/popoverTouchBar) property. Enable press-and-hold by specifying a bar in the [`pressAndHoldTouchBar`](/documentation/AppKit/NSPopoverTouchBarItem/pressAndHoldTouchBar) property. The press-and-hold feature is suitable only for a simple popover, such as one that contains a single segmented control (an instance of the [`NSSegmentedControl`](/documentation/AppKit/NSSegmentedControl) class) or slider (an instance of the [`NSSliderTouchBarItem`](/documentation/AppKit/NSSliderTouchBarItem) class).

> Note:
> If your popover bar requires significant user interaction and contains many items or many scroll views, don’t enable press-and-hold; doing so can result in an awkward user experience.

The system automatically shows a chevron in the popover item under the following conditions: You specify the same [`NSTouchBar`](/documentation/AppKit/NSTouchBar) object for both [`pressAndHoldTouchBar`](/documentation/AppKit/NSPopoverTouchBarItem/pressAndHoldTouchBar) and [`popoverTouchBar`](/documentation/AppKit/NSPopoverTouchBarItem/popoverTouchBar) properties, *and* you use the default view for the popover item’s [`collapsedRepresentation`](/documentation/AppKit/NSPopoverTouchBarItem/collapsedRepresentation) property.

If you provide a popover item that contains a scrubber (an [`NSScrubber`](/documentation/AppKit/NSScrubber) instance), you’ll likely want to dismiss both the scrubber and the popover after the user makes their selection in the scrubber. A good approach to achieve this user interaction is to subclass [`NSPopoverTouchBarItem`](/documentation/AppKit/NSPopoverTouchBarItem), employing your instance of the subclass as the scrubber’s delegate. You can then configure the delegate object, within its [`didFinishInteracting(with:)`](/documentation/AppKit/NSScrubberDelegate/didFinishInteracting(with:)) method, to call the popover’s [`dismissPopover(_:)`](/documentation/AppKit/NSPopoverTouchBarItem/dismissPopover(_:)) method.

If you place a segmented control in a bar for a popover item, take care *not* to use [`NSSegmentedControl.SwitchTracking.momentary`](/documentation/AppKit/NSSegmentedControl/SwitchTracking/momentary) option of the [`NSSegmentedControl.SwitchTracking`](/documentation/AppKit/NSSegmentedControl/SwitchTracking) enumeration because doing so interferes with the user’s operation of the control.

### Other common item types

To provide a *slider item*, always use the [`NSSliderTouchBarItem`](/documentation/AppKit/NSSliderTouchBarItem) class, which employs a standard slider but is optimized for user interaction with the Touch Bar. (That is, don’t instead add an [`NSSlider`](/documentation/AppKit/NSSlider) object directly to a custom item.)

A *group item* (an instance of the [`NSGroupTouchBarItem`](/documentation/AppKit/NSGroupTouchBarItem) class) is a container that provides a bar, in its [`groupTouchBar`](/documentation/AppKit/NSGroupTouchBarItem/groupTouchBar) property, with its own array of items. You can enable customization for the items in a group’s contained bar, in the same way you would for items directly within a top-level bar. Using a group item lets you provide different user customization rules for different parts of the Touch Bar. Using a group item also lets you enable centering of the group within the Touch Bar.

A *spacing item* lets you add custom spacing between items in a bar. Specify a spacing item for a bar by assigning the [`fixedSpaceSmall`](/documentation/AppKit/NSTouchBarItem/Identifier-swift.struct/fixedSpaceSmall), [`fixedSpaceLarge`](/documentation/AppKit/NSTouchBarItem/Identifier-swift.struct/fixedSpaceLarge), or [`flexibleSpace`](/documentation/AppKit/NSTouchBarItem/Identifier-swift.struct/flexibleSpace) identifier to an item, and adding that item to the bar’s items array. The system automatically instantiates and configures spacing items based on the identifiers you specify.

### Configuration

You must configure each item with a unique identifier, and can optionally assign a visibility priority or tag it as a principal item.

**NSTouchBarItem identification.** You must provide a unique identifier for each item in the bar, apart from spacing items. Specify an identifier, of type [`NSTouchBarItem.Identifier`](/documentation/AppKit/NSTouchBarItem/Identifier-swift.struct) (called an *item identifier*), for each item when you initialize it. The item identifier serves as a persistable weak reference to the item. The system uses item identifiers to populate bars and to track and record changes for user customization.

**NSTouchBarItem priority for visibility.** If the system is showing a bar in the Touch Bar, but horizontal space is constrained and the bar defines more items than will fit, the system hides some of the items. You influence this hide/show behavior by setting a value for the [`visibilityPriority`](/documentation/AppKit/NSTouchBarItem/visibilityPriority) property of each item.

Lower-visibility-priority items get hidden by the system, as needed, before higher-visibility-priority items do.

To set visibility priority, use the constants in the [`NSTouchBarItem.Priority`](/documentation/AppKit/NSTouchBarItem/Priority) enumeration, or assign an integer value. The value `0` indicates [`normal`](/documentation/AppKit/NSTouchBarItem/Priority/normal) visibility priority. Visibility priority increases with increasing numerical value. The [`low`](/documentation/AppKit/NSTouchBarItem/Priority/low) constant provides a value of `-1000`; the [`high`](/documentation/AppKit/NSTouchBarItem/Priority/high) constant, a value `+1000`. You can use integers outside of this range if you need to.

The system hides or shows groups of identical-priority items (defined within a single bar) together. The one exception to this rule is for items whose visibility priority is [`normal`](/documentation/AppKit/NSTouchBarItem/Priority/normal); these items get hidden one-by-one, with the normal-priority item farthest to the right getting hidden first. If horizontal space later increases in the Touch Bar, and hidden, normal-priority items become eligible for display, the system first shows the most recently-hidden of those items.

**Principal Items.** Within a bar, you can optionally specify an item as having special significance by employing the [`principalItemIdentifier`](/documentation/AppKit/NSTouchBar/principalItemIdentifier) property. The system attempts to center a principal item within the Touch Bar. If you want a group of items to appear centered in the Touch Bar, designate the group item (of type [`NSTouchBarItem`](/documentation/AppKit/NSTouchBarItem)) as the principal item.

If more than one bar in the responder chain is eligible to be visible in the Touch Bar, and more than one of those has a principal item, the system determines which one to center in the Touch Bar.

#### Fonts, images, and colors

When using a button in a custom item, don’t attempt to set the button title’s font. In the Touch Bar, the system specifies fonts for standard controls.

If you need to specify a font, such as for custom drawing, use the [`systemFont(ofSize:)`](/documentation/AppKit/NSFont/systemFont(ofSize:)) class method (or related methods) of the [`NSFont`](/documentation/AppKit/NSFont) class. Use a font size of `0` to automatically obtain appropriate sizing for the Touch Bar.

If you use an image in a button or other control in the Touch Bar, take care to employ a template image. Template images in the Touch Bar respond automatically to system white-point changes, and automatically react to user interactions. The overview in this document lists the built-in Touch Bar template images.

To use your own image assets, use Retina-resolution images, designated as `@2x` in your asset catalog and with a maximum height of 30 points (corresponding to 60 pixels).

To set colors on objects within an [`NSTouchBarItem`](/documentation/AppKit/NSTouchBarItem) object, use AppKit named colors and use a bezel color property (available starting in macOS 10.12.1). Named colors appear correctly in the Touch Bar, support appearance vibrancy, and respond to system white-point changes. In a button or a segmented control, employ the bezel color property to ensure appropriate appearance in the Touch Bar.

To set the background color on a button within a custom item, use code like this:

```swift
myButton.bezelColor = NSColor.controlColor 
```

To set color on text and glyphs in the Touch Bar, use the following colors from the [`NSColor`](/documentation/AppKit/NSColor) class:

- [`labelColor`](/documentation/AppKit/NSColor/labelColor)
- [`secondaryLabelColor`](/documentation/AppKit/NSColor/secondaryLabelColor)
- [`tertiaryLabelColor`](/documentation/AppKit/NSColor/tertiaryLabelColor)
- [`quaternaryLabelColor`](/documentation/AppKit/NSColor/quaternaryLabelColor)

The system automatically changes the relative brightness and the white-point of these colors, depending on the ambient light, and depending on other factors such as keyboard backlight level. Always use these colors, or colors that dynamically derive from these colors, for control backgrounds, text, icons, and glyphs in the Touch Bar.

#### Handling touch events

The easiest way to handle touch events in an item is to use AppKit controls, such as by adding a button, a segmented control, or a scrubber to the item. Standard AppKit controls convey touch events to your specified targets automatically, so use standard controls whenever possible in your app.

If standard controls are insufficient, you can create composite views with a combination of standard controls, custom views, and gesture recognizers that you manually add to those custom views.

If you require the lowest-level of control for touch event processing, you can use the [`NSTouch`](/documentation/AppKit/NSTouch) class directly. You might go this route, for example, to provide good user feedback in the case of a control placed within a scroll view.Direct use of touch methods allows fine-grained control over interaction. You can, for example, highlight a control immediately upon a user touching it, and then remove the highlight if the user then, without lifting the finger, performs a scroll gesture.

If using the [`NSTouch`](/documentation/AppKit/NSTouch) class directly, be sure to implement the [`touchesCancelled(with:)`](/documentation/AppKit/NSGestureRecognizer/touchesCancelled(with:)) responder method, because users can perform touch interactions that result in canceled touches.

## Topics

### Creating a bar item

[`init(identifier:)`](/documentation/AppKit/NSTouchBarItem/init(identifier:))

Creates a new item with the specified identifier.

[`NSTouchBarItem.Identifier`](/documentation/AppKit/NSTouchBarItem/Identifier-swift.struct)

An identifier for an item in the Touch Bar.

[`init(coder:)`](/documentation/AppKit/NSTouchBarItem/init(coder:))

Initializes and returns a new item from a storyboard or nib file.

### Identifying a bar item

[`identifier`](/documentation/AppKit/NSTouchBarItem/identifier-swift.property)

The identifier for this item.

[`NSTouchBarItem.Identifier`](/documentation/AppKit/NSTouchBarItem/Identifier-swift.struct)

An identifier for an item in the Touch Bar.

### Managing item visibility

[`visibilityPriority`](/documentation/AppKit/NSTouchBarItem/visibilityPriority)

Determines which items are shown in a bar when space is limited.

[`NSTouchBarItem.Priority`](/documentation/AppKit/NSTouchBarItem/Priority)

Priorities for the visibility of a Touch Bar item.

[`isVisible`](/documentation/AppKit/NSTouchBarItem/isVisible)

A Boolean value that reflects whether or not the item is visible.

### Configuring bar customization

[`customizationLabel`](/documentation/AppKit/NSTouchBarItem/customizationLabel)

The user-visible string identifying this item during bar customization.

### Subclassing bar items

[`viewController`](/documentation/AppKit/NSTouchBarItem/viewController)

The view controller associated with this item.

[`view`](/documentation/AppKit/NSTouchBarItem/view)

The view associated with this item.

### Using template images

[`touchBarAddDetailTemplateName`](/documentation/AppKit/NSImage/touchBarAddDetailTemplateName)

A template image for showing additional detail for an item.

[`touchBarAddTemplateName`](/documentation/AppKit/NSImage/touchBarAddTemplateName)

A template image for creating a new item.

[`touchBarAlarmTemplateName`](/documentation/AppKit/NSImage/touchBarAlarmTemplateName)

A template image for setting or showing an alarm.

[`touchBarAudioInputMuteTemplateName`](/documentation/AppKit/NSImage/touchBarAudioInputMuteTemplateName)

A template image for muting audio input or denoting that audio input is muted.

[`touchBarAudioInputTemplateName`](/documentation/AppKit/NSImage/touchBarAudioInputTemplateName)

A template image for denoting audio input.

[`touchBarAudioOutputMuteTemplateName`](/documentation/AppKit/NSImage/touchBarAudioOutputMuteTemplateName)

A template image for muting audio output or for denoting that audio output is muted.

[`touchBarAudioOutputVolumeHighTemplateName`](/documentation/AppKit/NSImage/touchBarAudioOutputVolumeHighTemplateName)

A template image for setting the audio output volume to a high level, or for denoting that the audio is at the peak volume.

[`touchBarAudioOutputVolumeLowTemplateName`](/documentation/AppKit/NSImage/touchBarAudioOutputVolumeLowTemplateName)

A template image for setting the audio output volume to a low level, or for denoting that it is set to a low level.

[`touchBarAudioOutputVolumeMediumTemplateName`](/documentation/AppKit/NSImage/touchBarAudioOutputVolumeMediumTemplateName)

A template image for setting the audio output volume to a medium level, or for denoting that it is set to a medium level.

[`touchBarAudioOutputVolumeOffTemplateName`](/documentation/AppKit/NSImage/touchBarAudioOutputVolumeOffTemplateName)

A template image for setting the audio output volume to silent, or for denoting that it is set to silent.

[`touchBarBookmarksTemplateName`](/documentation/AppKit/NSImage/touchBarBookmarksTemplateName)

A template image for showing app-specific bookmarks.

[`touchBarColorPickerFillName`](/documentation/AppKit/NSImage/touchBarColorPickerFillName)

A template image for showing a color picker so the user can select a fill color.

[`touchBarColorPickerFontName`](/documentation/AppKit/NSImage/touchBarColorPickerFontName)

A template image for showing a color picker so the user can select a text color.

[`touchBarColorPickerStrokeName`](/documentation/AppKit/NSImage/touchBarColorPickerStrokeName)

A template image for showing a color picker so the user can select a stroke color.

[`touchBarCommunicationAudioTemplateName`](/documentation/AppKit/NSImage/touchBarCommunicationAudioTemplateName)

A template image for initiating or denoting audio communication.

[`touchBarCommunicationVideoTemplateName`](/documentation/AppKit/NSImage/touchBarCommunicationVideoTemplateName)

A template image for initiating or denoting video communication.

[`touchBarComposeTemplateName`](/documentation/AppKit/NSImage/touchBarComposeTemplateName)

A template image for opening a new document or view in edit mode.

[`touchBarDeleteTemplateName`](/documentation/AppKit/NSImage/touchBarDeleteTemplateName)

A template image for deleting the current or selected item.

[`touchBarDownloadTemplateName`](/documentation/AppKit/NSImage/touchBarDownloadTemplateName)

A template image for downloading an item.

[`touchBarEnterFullScreenTemplateName`](/documentation/AppKit/NSImage/touchBarEnterFullScreenTemplateName)

A template image for entering full screen mode.

[`touchBarExitFullScreenTemplateName`](/documentation/AppKit/NSImage/touchBarExitFullScreenTemplateName)

A template image for exiting full screen mode.

[`touchBarFastForwardTemplateName`](/documentation/AppKit/NSImage/touchBarFastForwardTemplateName)

A template image for moving forward through media playback or slides.

[`touchBarFolderTemplateName`](/documentation/AppKit/NSImage/touchBarFolderTemplateName)

A template image for opening or representing a folder.

[`touchBarFolderCopyToTemplateName`](/documentation/AppKit/NSImage/touchBarFolderCopyToTemplateName)

A template image for copying an item to a destination.

[`touchBarFolderMoveToTemplateName`](/documentation/AppKit/NSImage/touchBarFolderMoveToTemplateName)

A template image for moving an item to a destination.

[`touchBarGetInfoTemplateName`](/documentation/AppKit/NSImage/touchBarGetInfoTemplateName)

A template image for showing information about an item.

[`touchBarGoBackTemplateName`](/documentation/AppKit/NSImage/touchBarGoBackTemplateName)

A template image for returning to the previous screen or location.

[`touchBarGoDownTemplateName`](/documentation/AppKit/NSImage/touchBarGoDownTemplateName)

A template image for moving to the next item in a list.

[`touchBarGoForwardTemplateName`](/documentation/AppKit/NSImage/touchBarGoForwardTemplateName)

A template image for moving to the next screen or location.

[`touchBarGoUpTemplateName`](/documentation/AppKit/NSImage/touchBarGoUpTemplateName)

A template image for moving to the previous item in a list.

[`touchBarHistoryTemplateName`](/documentation/AppKit/NSImage/touchBarHistoryTemplateName)

A template image for showing history information, such as recent downloads.

[`touchBarIconViewTemplateName`](/documentation/AppKit/NSImage/touchBarIconViewTemplateName)

A template image for showing items in an icon view.

[`touchBarListViewTemplateName`](/documentation/AppKit/NSImage/touchBarListViewTemplateName)

A template image for showing items in a list view.

[`touchBarMailTemplateName`](/documentation/AppKit/NSImage/touchBarMailTemplateName)

A template image for creating an email message.

[`touchBarNewFolderTemplateName`](/documentation/AppKit/NSImage/touchBarNewFolderTemplateName)

A template image for creating a new folder.

[`touchBarNewMessageTemplateName`](/documentation/AppKit/NSImage/touchBarNewMessageTemplateName)

A template image for creating a new message, or for denoting the use of messaging.

[`touchBarOpenInBrowserTemplateName`](/documentation/AppKit/NSImage/touchBarOpenInBrowserTemplateName)

A template image for opening an item in the user’s browser.

[`touchBarPauseTemplateName`](/documentation/AppKit/NSImage/touchBarPauseTemplateName)

A template image for pausing media playback or slides.

[`touchBarPlayTemplateName`](/documentation/AppKit/NSImage/touchBarPlayTemplateName)

A template image for starting or resuming playback of media or slides.

[`touchBarPlayPauseTemplateName`](/documentation/AppKit/NSImage/touchBarPlayPauseTemplateName)

A template image for toggling between playing and pausing media or slides.

[`touchBarPlayheadTemplateName`](/documentation/AppKit/NSImage/touchBarPlayheadTemplateName)

A template image for denoting the current playback position within a timeline track.

[`touchBarQuickLookTemplateName`](/documentation/AppKit/NSImage/touchBarQuickLookTemplateName)

A template image for opening an item in Quick Look.

[`touchBarRecordStartTemplateName`](/documentation/AppKit/NSImage/touchBarRecordStartTemplateName)

A template image for starting recording.

[`touchBarRecordStopTemplateName`](/documentation/AppKit/NSImage/touchBarRecordStopTemplateName)

A template image for stopping recording or stopping playback of media or slides.

[`touchBarRefreshTemplateName`](/documentation/AppKit/NSImage/touchBarRefreshTemplateName)

A template image for refreshing displayed data.

[`touchBarRewindTemplateName`](/documentation/AppKit/NSImage/touchBarRewindTemplateName)

A template image for moving backwards through media or slides.

[`touchBarRotateLeftTemplateName`](/documentation/AppKit/NSImage/touchBarRotateLeftTemplateName)

A template image for rotating an item counterclockwise.

[`touchBarRotateRightTemplateName`](/documentation/AppKit/NSImage/touchBarRotateRightTemplateName)

A template image for rotating an item clockwise.

[`touchBarSearchTemplateName`](/documentation/AppKit/NSImage/touchBarSearchTemplateName)

A template image for showing a search field or for initiating a search.

[`touchBarShareTemplateName`](/documentation/AppKit/NSImage/touchBarShareTemplateName)

A template image for sharing content with others directly or via social media.

[`touchBarSidebarTemplateName`](/documentation/AppKit/NSImage/touchBarSidebarTemplateName)

A template image for showing a sidebar in the current view.

[`touchBarSkipBackTemplateName`](/documentation/AppKit/NSImage/touchBarSkipBackTemplateName)

A template image for skipping to the previous chapter or location during media playback.

[`touchBarSkipToStartTemplateName`](/documentation/AppKit/NSImage/touchBarSkipToStartTemplateName)

A template image for skipping to the start of media playback.

[`touchBarSkipBack30SecondsTemplateName`](/documentation/AppKit/NSImage/touchBarSkipBack30SecondsTemplateName)

A template image for skipping back 30 seconds during media playback.

[`touchBarSkipBack15SecondsTemplateName`](/documentation/AppKit/NSImage/touchBarSkipBack15SecondsTemplateName)

A template image for skipping back 15 seconds during media playback.

[`touchBarSkipAhead15SecondsTemplateName`](/documentation/AppKit/NSImage/touchBarSkipAhead15SecondsTemplateName)

A template image for skipping ahead 15 seconds during media playback.

[`touchBarSkipAhead30SecondsTemplateName`](/documentation/AppKit/NSImage/touchBarSkipAhead30SecondsTemplateName)

A template image for skipping ahead 30 seconds during media playback.

[`touchBarSkipToEndTemplateName`](/documentation/AppKit/NSImage/touchBarSkipToEndTemplateName)

A template image for skipping to the end of media playback.

[`touchBarSkipAheadTemplateName`](/documentation/AppKit/NSImage/touchBarSkipAheadTemplateName)

A template image for skipping to the next chapter or location during media playback.

[`touchBarSlideshowTemplateName`](/documentation/AppKit/NSImage/touchBarSlideshowTemplateName)

A template image for starting a slideshow.

[`touchBarTagIconTemplateName`](/documentation/AppKit/NSImage/touchBarTagIconTemplateName)

A template image for applying a tag to an item.

[`touchBarTextBoxTemplateName`](/documentation/AppKit/NSImage/touchBarTextBoxTemplateName)

A template image for inserting a text box.

[`touchBarTextListTemplateName`](/documentation/AppKit/NSImage/touchBarTextListTemplateName)

A template image for inserting a list or converting text to list form.

[`touchBarTextBoldTemplateName`](/documentation/AppKit/NSImage/touchBarTextBoldTemplateName)

A template image for making selected text bold.

[`touchBarTextItalicTemplateName`](/documentation/AppKit/NSImage/touchBarTextItalicTemplateName)

A template image for italicizing the selected text.

[`touchBarTextUnderlineTemplateName`](/documentation/AppKit/NSImage/touchBarTextUnderlineTemplateName)

A template image for underlining text.

[`touchBarTextStrikethroughTemplateName`](/documentation/AppKit/NSImage/touchBarTextStrikethroughTemplateName)

A template image for striking through text.

[`touchBarTextJustifiedAlignTemplateName`](/documentation/AppKit/NSImage/touchBarTextJustifiedAlignTemplateName)

A template image for fully justifying text.

[`touchBarTextLeftAlignTemplateName`](/documentation/AppKit/NSImage/touchBarTextLeftAlignTemplateName)

A template image for aligning text to the left.

[`touchBarTextCenterAlignTemplateName`](/documentation/AppKit/NSImage/touchBarTextCenterAlignTemplateName)

A template image for centering text.

[`touchBarTextRightAlignTemplateName`](/documentation/AppKit/NSImage/touchBarTextRightAlignTemplateName)

A template image for aligning text to the right.

[`touchBarUserTemplateName`](/documentation/AppKit/NSImage/touchBarUserTemplateName)

A template image for showing or representing user information.

[`touchBarUserAddTemplateName`](/documentation/AppKit/NSImage/touchBarUserAddTemplateName)

A template image for creating a new user account.

[`touchBarUserGroupTemplateName`](/documentation/AppKit/NSImage/touchBarUserGroupTemplateName)

A template image for showing or representing a group of users.

[`touchBarVolumeUpTemplateName`](/documentation/AppKit/NSImage/touchBarVolumeUpTemplateName)

A template image for increasing the audio output volume.

[`touchBarVolumeDownTemplateName`](/documentation/AppKit/NSImage/touchBarVolumeDownTemplateName)

A template image for reducing the audio output volume.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)