<!--
{
  "documentType" : "article",
  "framework" : "TVML",
  "identifier" : "/documentation/TVML/menubar",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "menuBar"
}
-->

# menuBar

Displays menu items along the top of the screen.

## Overview

Users can navigate left and right to move between `menuBar` elements. Here’s an example
of a menu bar with two items inside of a `menuBarTemplate` element.

```xml
<menuBarTemplate>
    <menuBar>
        <menuItem id="navigation_top_movies" data-identifier="list">
            <title>Top Movies</title>
        </menuItem>
        <menuItem id="navigation_genres" data-identifier="index">
            <title>Genres</title>
        </menuItem>
    </menuBar>
</menuBarTemplate>
```

You can also add view elements to the left and right sides of the menu bar. The left
`leadingAccessoryView` and right `trailingAccessoryView` can be any simple element,
including [Display Elements](/documentation/TVML/display-elements), [Multimedia Elements](/documentation/TVML/multimedia-elements), and [Text Elements](/documentation/TVML/text-elements).
Accessory views can also be row elements.

To add the equivalent of a <doc://com.apple.documentation/documentation/UIKit/UITabBar/leadingAccessoryView>,
add any supported element before the [menuBar](/documentation/TVML/menubar) opening tag, as shown here:

```xml
<menuBarTemplate>
    <img src="path to images on your server/leading_icon.png"/>
    <menuBar>
        <menuItem id="navigation_top_movies" data-identifier="list">
            <title>Top Movies</title>
        </menuItem>
    </menuBar>
</menuBarTemplate>
```

To add the equivalent of a <doc://com.apple.documentation/documentation/UIKit/UITabBar/trailingAccessoryView>,
add any supported element after the [menuBar](/documentation/TVML/menubar) closing tag, as shown here:

```xml
<menuBarTemplate>
    <menuBar>
        <menuItem id="navigation_top_movies" data-identifier="list">
            <title>Top Movies</title>
        </menuItem>
    </menuBar>
    <img src="path to images on your server/trailing_icon.png"/>
</menuBarTemplate>
```

### Subelements of menuBar

- [menuItem](/documentation/TVML/menuitem)
- [section](/documentation/TVML/section)

### Elements that Use menuBar

- [mainTemplate](/documentation/TVML/maintemplate)
- [menuBarTemplate](/documentation/TVML/menubartemplate)

## Topics

### Valid TVML Style

[tv-tint-color](/documentation/TVML/tv-tint-color)

Sets the tint color for an element.

### Valid TVML Attributes

[binding](/documentation/TVML/binding)

Associates information in a data item with an element.

[prototype](/documentation/TVML/prototype)

Associates a data item type with an element.

[theme](/documentation/TVML/theme)

Sets the color scheme for an element.



---

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)