<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 13.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPListItem/init(text:detailText:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(cs)CPListItem(im)initWithText:detailText:"
  },
  "title" : "init(text:detailText:)"
}
-->

# init(text:detailText:)

Creates a list item with primary and secondary text.

```
init(text: String?, detailText: String?)
```

## Parameters

`text`

The primary text to show in the list item cell.

`detailText`

Additional text to display below the primary text in the list item cell.

## Return Value

A newly initialized list item.

---

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)