<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/AttributedTextSelection/typingAttributes(in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI23AttributedTextSelectionV16typingAttributes2in10Foundation18AttributeContainerVAF0C6StringV_tF"
  },
  "title" : "typingAttributes(in:)"
}
-->

# typingAttributes(in:)

Returns the typing attributes for a corresponding text.

```
func typingAttributes(in text: AttributedString) -> AttributeContainer
```

## Discussion

The typing attributes are the attributes that will be applied to any new
characters typed out by the user.

> Note: The returned container may contain values for attributes that
> specify <doc://com.apple.documentation/documentation/Foundation/AttributedStringKey/runBoundaries>
> and thus might not actually get applied to new content.

---

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)