<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSAttributedString/Key/textEffect",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@NSTextEffectAttributeName"
  },
  "title" : "textEffect"
}
-->

# textEffect

An attribute that applies a text effect to the text.

```
static let textEffect: NSAttributedString.Key
```

## Discussion

The value of this attribute is an [`NSString`](/documentation/Foundation/NSString) object. Use this attribute to specify a text effect, such as [`letterpressStyle`](/documentation/Foundation/NSAttributedString/TextEffectStyle/letterpressStyle). The default value of this property is `nil`, indicating no text effect.

---

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)