---
title: caption
framework: messages
role: symbol
role_heading: Instance Property
path: messages/msmessagetemplatelayout/caption
---

# caption

A left-aligned caption for the message bubble.

## Declaration

```swift
var caption: String? { get set }
```

## Discussion

Discussion The caption is drawn using black text and is positioned at the bottom-left corner of the message bubble, just below the image or media file. The caption can wrap to three lines before being truncated. This property defaults to nil.

## See Also

### Assigning Visual Elements

- [image](messages/msmessagetemplatelayout/image.md)
- [mediaFileURL](messages/msmessagetemplatelayout/mediafileurl.md)
- [imageTitle](messages/msmessagetemplatelayout/imagetitle.md)
- [imageSubtitle](messages/msmessagetemplatelayout/imagesubtitle.md)
- [subcaption](messages/msmessagetemplatelayout/subcaption.md)
- [trailingCaption](messages/msmessagetemplatelayout/trailingcaption.md)
- [trailingSubcaption](messages/msmessagetemplatelayout/trailingsubcaption.md)
