<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: -",
    "tvOS: 14.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIListContentConfiguration-swift.struct",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:5UIKit26UIListContentConfigurationV"
  },
  "title" : "UIListContentConfiguration"
}
-->

# UIListContentConfiguration

A content configuration for a list-based content view.

```
struct UIListContentConfiguration
```

## Overview

A list content configuration describes the styling and content for an individual element that might appear in a list, like a cell, header, or footer. Using a list content configuration, you can obtain system default styling for a variety of different view states. You fill the configuration with your content, and then assign it directly to cells, headers, and footers in [`UICollectionView`](/documentation/UIKit/UICollectionView) and [`UITableView`](/documentation/UIKit/UITableView), or to your own custom list content view ([`UIListContentView`](/documentation/UIKit/UIListContentView)).

For views like cells, headers, and footers, use their [`defaultContentConfiguration()`](/documentation/UIKit/UICollectionViewListCell/defaultContentConfiguration()) to get a list content configuration that has preconfigured default styling. Alternatively, you can create a list content configuration from one of the system default styles. After you get the configuration, you assign your content to it, customize any other properties, and assign it to your view as the current content configuration.

```swift
var content = cell.defaultContentConfiguration()

// Configure content.
content.image = UIImage(systemName: "star")
content.text = "Favorites"

// Customize appearance.
content.imageProperties.tintColor = .purple

cell.contentConfiguration = content
```

## Topics

### Creating default cell configurations

[`cell()`](/documentation/UIKit/UIListContentConfiguration-swift.struct/cell())

Creates the default configuration you use to style a cell in a list.

[`subtitleCell()`](/documentation/UIKit/UIListContentConfiguration-swift.struct/subtitleCell())

Creates the default configuration you use to style a cell that’s in a list and contains subtitle text.

[`valueCell()`](/documentation/UIKit/UIListContentConfiguration-swift.struct/valueCell())

Creates the default configuration you use to style a cell that’s in a list and contains side-by-side value text.

[`sidebarCell()`](/documentation/UIKit/UIListContentConfiguration-swift.struct/sidebarCell())

Creates the default configuration you use to style a cell in a sidebar list.

[`sidebarSubtitleCell()`](/documentation/UIKit/UIListContentConfiguration-swift.struct/sidebarSubtitleCell())

Creates the default configuration you use to style a cell that’s in a sidebar list and contains subtitle text.

[`accompaniedSidebarCell()`](/documentation/UIKit/UIListContentConfiguration-swift.struct/accompaniedSidebarCell())

Creates the default configuration you use to style a cell in an accompanied sidebar list.

[`accompaniedSidebarSubtitleCell()`](/documentation/UIKit/UIListContentConfiguration-swift.struct/accompaniedSidebarSubtitleCell())

Creates the default configuration you use to style a cell that’s in an accompanied sidebar list and contains subtitle text.

### Creating header and footer configurations

[`plainHeader()`](/documentation/UIKit/UIListContentConfiguration-swift.struct/plainHeader())

Creates the default configuration you use to style a header in a plain list.

[`plainFooter()`](/documentation/UIKit/UIListContentConfiguration-swift.struct/plainFooter())

Creates the default configuration you use to style a footer in a plain list.

[`groupedHeader()`](/documentation/UIKit/UIListContentConfiguration-swift.struct/groupedHeader())

Creates the default configuration you use to style a header in a grouped list.

[`groupedFooter()`](/documentation/UIKit/UIListContentConfiguration-swift.struct/groupedFooter())

Creates the default configuration you use to style a footer in a grouped list.

[`prominentInsetGroupedHeader()`](/documentation/UIKit/UIListContentConfiguration-swift.struct/prominentInsetGroupedHeader())

Creates the default configuration you use to style a prominent header in an inset grouped list.

[`extraProminentInsetGroupedHeader()`](/documentation/UIKit/UIListContentConfiguration-swift.struct/extraProminentInsetGroupedHeader())

Creates the default configuration you use to style an extra prominent header in an inset grouped list.

[`sidebarHeader()`](/documentation/UIKit/UIListContentConfiguration-swift.struct/sidebarHeader())

Creates the default configuration you use to style a header in a sidebar list.

### Customizing content

[`image`](/documentation/UIKit/UIListContentConfiguration-swift.struct/image)

The image to display.

[`text`](/documentation/UIKit/UIListContentConfiguration-swift.struct/text)

The primary text.

[`attributedText`](/documentation/UIKit/UIListContentConfiguration-swift.struct/attributedText)

An attributed variant of the primary text.

[`secondaryText`](/documentation/UIKit/UIListContentConfiguration-swift.struct/secondaryText)

The secondary text.

[`secondaryAttributedText`](/documentation/UIKit/UIListContentConfiguration-swift.struct/secondaryAttributedText)

An attributed variant of the secondary text.

### Customizing appearance

[`imageProperties`](/documentation/UIKit/UIListContentConfiguration-swift.struct/imageProperties-swift.property)

Properties for configuring the image.

[`textProperties`](/documentation/UIKit/UIListContentConfiguration-swift.struct/textProperties-swift.property)

Properties for configuring the primary text.

[`secondaryTextProperties`](/documentation/UIKit/UIListContentConfiguration-swift.struct/secondaryTextProperties)

Properties for configuring the secondary text.

[`ImageProperties`](/documentation/UIKit/UIListContentConfiguration-swift.struct/ImageProperties-swift.struct)

Properties that affect the list content configuration’s image.

[`TextProperties`](/documentation/UIKit/UIListContentConfiguration-swift.struct/TextProperties-swift.struct)

Properties that affect the list content configuration’s text.

### Customizing layout

[`axesPreservingSuperviewLayoutMargins`](/documentation/UIKit/UIListContentConfiguration-swift.struct/axesPreservingSuperviewLayoutMargins)

A Boolean value that determines whether the content view preserves the layout margins that it inherits from its superview on the horizontal or vertical axes.

[`directionalLayoutMargins`](/documentation/UIKit/UIListContentConfiguration-swift.struct/directionalLayoutMargins)

The margins between the content and the edges of the content view.

[`prefersSideBySideTextAndSecondaryText`](/documentation/UIKit/UIListContentConfiguration-swift.struct/prefersSideBySideTextAndSecondaryText)

A Boolean value that determines whether the configuration positions the text and secondary text side by side.

[`imageToTextPadding`](/documentation/UIKit/UIListContentConfiguration-swift.struct/imageToTextPadding)

The padding between the image and text.

[`textToSecondaryTextHorizontalPadding`](/documentation/UIKit/UIListContentConfiguration-swift.struct/textToSecondaryTextHorizontalPadding)

The minimum horizontal padding between the text and secondary text.

[`textToSecondaryTextVerticalPadding`](/documentation/UIKit/UIListContentConfiguration-swift.struct/textToSecondaryTextVerticalPadding)

The vertical padding between the text and secondary text.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`Copyable`](/documentation/Swift/Copyable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`UIContentConfiguration-9eib5`](/documentation/UIKit/UIContentConfiguration-9eib5)

[`CustomReflectable`](/documentation/Swift/CustomReflectable)

[`Escapable`](/documentation/Swift/Escapable)

---

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)