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

# card

Creates a generic element with its contained elements arranged through TVML styles.

## Overview

The `card` element provides the ability to manually arrange its containing elements.
It creates a view where the elements it contains are arranged using the `tv-align`
and `tv-position` styles. Containing elements are centered by default.

![Layout diagram showing the positions other elements can be placed in.](images/com.apple.TVML/card-1.png)

Elements contained in the same position are arranged from the top of the cell to
the bottom, in the same order in which they are specified in the `card` element.
You can specify a `<background><img /></background>` that displays a background image
inside of the `card`. The background image is top-aligned and is fitted to the size
of the `card` while keeping the image’s original aspect ratio. Text wrapping inside
of the `card` only occurs in the `header`, `center`, and `footer` positions.

### Subelements of card

- [background](/documentation/TVML/background)
- [badge](/documentation/TVML/badge)
- [button](/documentation/TVML/button)
- [buttonLockup](/documentation/TVML/buttonlockup)
- [img](/documentation/TVML/img)
- [ordinal](/documentation/TVML/ordinal)
- [placeholder](/documentation/TVML/placeholder)
- [ratingBadge](/documentation/TVML/ratingbadge)
- [row](/documentation/TVML/row)
- [seasonBadge](/documentation/TVML/seasonbadge)
- [text](/documentation/TVML/text)
- [textBadge](/documentation/TVML/textbadge)

### Elements that Use card

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

## Topics

### Valid TVML Styles

[border-radius](/documentation/TVML/border-radius)

Changes the shape of an element’s corner.

### 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)