<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/LabelStyle",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI10LabelStyleP"
  },
  "title" : "LabelStyle"
}
-->

# LabelStyle

A type that applies a custom appearance to all labels within a view.

```
@MainActor @preconcurrency protocol LabelStyle
```

## Overview

To configure the current label style for a view hierarchy, use the
[`labelStyle(_:)`](/documentation/SwiftUI/View/labelStyle(_:)) modifier.

A type conforming to this protocol inherits `@preconcurrency @MainActor`
isolation from the protocol if the conformance is included in the type’s
base declaration:

```
struct MyCustomType: Transition {
    // `@preconcurrency @MainActor` isolation by default
}
```

Isolation to the main actor is the default, but it’s not required. Declare
the conformance in an extension to opt out of main actor isolation:

```
extension MyCustomType: Transition {
    // `nonisolated` by default
}
```

## Topics

### Getting built-in label styles

[`automatic`](/documentation/SwiftUI/LabelStyle/automatic)

A label style that resolves its appearance automatically based on the
current context.

[`iconOnly`](/documentation/SwiftUI/LabelStyle/iconOnly)

A label style that only displays the icon of the label.

[`titleAndIcon`](/documentation/SwiftUI/LabelStyle/titleAndIcon)

A label style that shows both the title and icon of the label using a
system-standard layout.

[`titleOnly`](/documentation/SwiftUI/LabelStyle/titleOnly)

A label style that only displays the title of the label.

### Creating custom label styles

[`makeBody(configuration:)`](/documentation/SwiftUI/LabelStyle/makeBody(configuration:))

Creates a view that represents the body of a label.

[`Configuration`](/documentation/SwiftUI/LabelStyle/Configuration)

The properties of a label.

[`Body`](/documentation/SwiftUI/LabelStyle/Body)

A view that represents the body of a label.

### Supporting types

[`DefaultLabelStyle`](/documentation/SwiftUI/DefaultLabelStyle)

The default label style in the current context.

[`IconOnlyLabelStyle`](/documentation/SwiftUI/IconOnlyLabelStyle)

A label style that only displays the icon of the label.

[`TitleAndIconLabelStyle`](/documentation/SwiftUI/TitleAndIconLabelStyle)

A label style that shows both the title and icon of the label using a
system-standard layout.

[`TitleOnlyLabelStyle`](/documentation/SwiftUI/TitleOnlyLabelStyle)

A label style that only displays the title of the label.

## Relationships

### Conforming Types

[`IconOnlyLabelStyle`](/documentation/SwiftUI/IconOnlyLabelStyle)

[`TitleAndIconLabelStyle`](/documentation/SwiftUI/TitleAndIconLabelStyle)

[`DefaultLabelStyle`](/documentation/SwiftUI/DefaultLabelStyle)

[`TitleOnlyLabelStyle`](/documentation/SwiftUI/TitleOnlyLabelStyle)

---

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)