<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration/sections",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "StoreKit",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:17_StoreKit_SwiftUI012SubscriptionA25ControlStyleConfigurationV8sectionsSayAC7SectionVGvp"
  },
  "title" : "sections"
}
-->

# sections

The subscription options to merchandise by sections.

```
var sections: [SubscriptionStoreControlStyleConfiguration.Section] { get }
```

## Discussion

The [`sections`](/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration/sections) property represents the main content of your subscription store control style, including the auto-renewable subscription products.

Each [`SubscriptionStoreControlStyleConfiguration.Section`](/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration/Section) element contains an array of [`SubscriptionStoreControlStyleConfiguration.Option`](/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration/Option) values named [`options`](/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration/Section/options). Use this structure to modify the appearance of a control depending on the section it belongs to.

The elements of [`sections`](/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration/sections) represent [`SubscriptionOptionSection`](/documentation/StoreKit/SubscriptionOptionSection) instances. A minimal store has one implicit section, with the [`sections`](/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration/sections) property containing a single element. The single element’s [`header`](/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration/Section/header-swift.property) and [`footer`](/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration/Section/footer-swift.property) properties are both `nil`, and its [`options`](/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration/Section/options) property is identical to the [`options`](/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration/options) property on [`SubscriptionStoreControlStyleConfiguration`](/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration).

> Note:
> Typically, a style needs only one of the properties: ``doc://com.apple.storekit/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration/options`` or ``doc://com.apple.storekit/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration/sections``. Use the ``doc://com.apple.storekit/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration/sections`` property if your style supports sections.

Use the initializer of the [`SubscriptionStoreView`](/documentation/StoreKit/SubscriptionStoreView) to determine the contents of the [`sections`](/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration/sections) array.

Display only the subscription options that appear in the [`sections`](/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration/sections) array. Use the [`allOptions`](/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration/allOptions) property to access information about all the options, for example, to compute comparisons between subscription options. The view your style creates needs to provide a control that enables the customer to subscribe to each option in the array.

If you configure a subscription store view to show the current auto-renewal preference, the [`sections`](/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration/sections) array contains the [`autoRenewPreference`](/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration/autoRenewPreference) subscription product. There’s no need to specifically display the [`autoRenewPreference`](/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration/autoRenewPreference) product in that case.

---

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)