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

# centered

Centers media items in a shelf.

## Overview

Use the `centered` attribute to center items horizontally in a `shelf` element when
there are fewer elements than the shelf length.

### Values for centered

- Boolean: The shelf horizontally centers the elements inside of it when this
  attribute is set to `true`.

### Elements that Use centered

- [shelf](/documentation/TVML/shelf)

---

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)