<!--
{
  "availability" : [
    "macOS: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSMenu/PresentationStyle-swift.enum/palette",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSMenuPresentationStyle@NSMenuPresentationStylePalette"
  },
  "title" : "NSMenu.PresentationStyle.palette"
}
-->

# NSMenu.PresentationStyle.palette

A menu presentation style where items to display align horizontally.

```
case palette
```

## Discussion

You can turn any menu into a palette menu by setting the menu’s presentation style to `.palette`. For each menu item, set its image. For template images, AppKit automatically adds the appropriate selection tint. Alternatively you can set the [`offStateImage`](/documentation/AppKit/NSMenuItem/offStateImage) and the [`onStateImage`](/documentation/AppKit/NSMenuItem/onStateImage). Use the `onStateImage` to indicate selection.

The following example creates a presentation style menu that displays a list of sport images. When a menu item selects, the system automatically tints the image.

![A palette style menu that expands to the right from a selected sports menu item listing a series of sport images horizonally. The second item in the list is tinted indicating selection.](images/com.apple.appkit/media-4304532@2x.png)

```objc
NSMenu *parentMenu = [[NSMenu alloc] init];

// Create a menu.
NSMenu *paletteMenu = [[NSMenu alloc] init];
NSArray *symbols = @[@"figure.barre", @"figure.american.football", @"figure.soccer", @"figure.fishing", @"figure.roll"];
int index;
for(NSInteger index = 0; index < symbols.count; index++) {
    NSString *symbol = symbols[index];
    NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:symbol action:nil keyEquivalent:@""];
    item.image = [NSImage imageWithSystemSymbolName:symbol accessibilityDescription:@""];
    [paletteMenu addItem:item];
}

// Set the presentation style of the menu to palette.
paletteMenu.presentationStyle = NSMenuPresentationStylePalette;

// Create a menu item for the palette.
NSMenuItem *paletteMenuItem = [[NSMenuItem alloc] init];
paletteMenuItem.submenu = paletteMenu;

// Create a menu and corresponding menu item to contain the palette menu item.
NSMenu *menu = [[NSMenu alloc] initWithTitle:@"Sports"];
[menu addItem:[NSMenuItem sectionHeaderWithTitle:@"Sports Menu"]];
[menu addItem:paletteMenuItem];

NSMenuItem *menuItem = [[NSMenuItem alloc] init];
menuItem.title = @"Sports";
menuItem.submenu = menu;

// Add the menu containing the palette to the parent menu.
[parentMenu addItem:menuItem];
```

---

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)