---
title: CPListItem
framework: carplay
role: symbol
role_heading: Class
path: carplay/cplistitem
---

# CPListItem

A selectable row in a list template.

## Declaration

```swift
@MainActor class CPListItem
```

## Overview

Overview A list item manages the content of a single row in a list template. CarPlay manages the layout of a list item and may adjust its layout to allow for the display of auxiliary content, such as an accessory or a Now Playing indicator. A list item can display primary and secondary text and an image. It can also show an accessory or custom accessory image, and one of several indicators that the system provides. You assign a handler to a list item that CarPlay executes when the user selects the item. The handler receives the item and a closure that you must call after you finish processing the selection. CarPlay doesn’t support custom list item types. Instead, use the userInfo property to attach a value to the list item that provides additional context, such as specifying  a model object that corresponds to the item.

## Topics

### Creating a List Item

- [init(text:detailText:)](carplay/cplistitem/init(text:detailtext:).md)
- [init(text:detailText:image:)](carplay/cplistitem/init(text:detailtext:image:).md)
- [init(text:detailText:image:accessoryImage:accessoryType:)](carplay/cplistitem/init(text:detailtext:image:accessoryimage:accessorytype:).md)

### Managing Configuration

- [isEnabled](carplay/cplistitem/isenabled.md)
- [handler](carplay/cplistitem/handler.md)
- [userInfo](carplay/cplistitem/userinfo.md)

### Managing Accessories

- [accessoryType](carplay/cplistitem/accessorytype.md)
- [CPListItemAccessoryType](carplay/cplistitemaccessorytype.md)
- [accessoryImage](carplay/cplistitem/accessoryimage.md)
- [setAccessoryImage(_:)](carplay/cplistitem/setaccessoryimage(_:).md)

### Managing Content

- [text](carplay/cplistitem/text.md)
- [setText(_:)](carplay/cplistitem/settext(_:).md)
- [detailText](carplay/cplistitem/detailtext.md)
- [setDetailText(_:)](carplay/cplistitem/setdetailtext(_:).md)
- [image](carplay/cplistitem/image.md)
- [setImage(_:)](carplay/cplistitem/setimage(_:).md)
- [maximumImageSize](carplay/cplistitem/maximumimagesize.md)

### Managing Playback Information

- [isExplicitContent](carplay/cplistitem/isexplicitcontent.md)
- [isPlaying](carplay/cplistitem/isplaying.md)
- [playingIndicatorLocation](carplay/cplistitem/playingindicatorlocation.md)
- [CPListItemPlayingIndicatorLocation](carplay/cplistitemplayingindicatorlocation.md)
- [playbackProgress](carplay/cplistitem/playbackprogress.md)

### Managing the Assistant Cell

- [CPListItem.AssistantCellPosition](carplay/cplistitem/assistantcellposition.md)
- [CPListItem.AssistantCellVisibility](carplay/cplistitem/assistantcellvisibility.md)

### Deprecated

- [Deprecated Symbols](carplay/cplistitem-deprecated-symbols.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CPListTemplateItem](carplay/cplisttemplateitem.md)
- [CPPlayableItem](carplay/cpplayableitem.md)
- [CPSelectableListItem](carplay/cpselectablelistitem.md)
- [CVarArg](swift/cvararg.md)
- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)

## See Also

### Creating a Section

- [init(items:header:headerSubtitle:headerImage:headerButton:sectionIndexTitle:)](carplay/cplistsection/init(items:header:headersubtitle:headerimage:headerbutton:sectionindextitle:).md)
- [CPListTemplateItem](carplay/cplisttemplateitem.md)
- [CPSelectableListItem](carplay/cpselectablelistitem.md)
- [CPListImageRowItem](carplay/cplistimagerowitem.md)
- [CPMessageListItem](carplay/cpmessagelistitem.md)
