<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPMessageListItemLeadingConfiguration/init(leadingItem:leadingImage:unread:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(cs)CPMessageListItemLeadingConfiguration(im)initWithLeadingItem:leadingImage:unread:"
  },
  "title" : "init(leadingItem:leadingImage:unread:)"
}
-->

# init(leadingItem:leadingImage:unread:)

Creates a leading configuration that contains an item and an image.

```
init(leadingItem: CPMessageLeadingItem, leadingImage: UIImage?, unread: Bool)
```

## Parameters

`leadingItem`

The item to show in the leading region of the message list item. See [`CPMessageLeadingItem`](/documentation/CarPlay/CPMessageLeadingItem) for the available options.

`leadingImage`

The image to show in the leading region of the message list item.

`unread`

If <doc://com.apple.documentation/documentation/Swift/true>, the message list item displays an indicator that shows the message is in an unread state.

## Discussion

Provide an image that is display-ready. If necessary, provide light and dark variants using an asset catalog, or use an instance of <doc://com.apple.documentation/documentation/UIKit/UIImageAsset> and register an image for each interface style. To properly size your image, use the display scale of the vehicle’s primary screen, which you access from your interface controller’s [`carTraitCollection`](/documentation/CarPlay/CPInterfaceController/carTraitCollection) property. Make sure that the image isn’t larger than [`CPMaximumMessageItemImageSize`](/documentation/CarPlay/CPMaximumMessageItemImageSize).

CarPlay doesn’t support animated images. If you provide an animated image, CarPlay uses only the first image in the animation sequence.

---

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)