---
title: AttributeScopes
framework: foundation
role: symbol
role_heading: Enumeration
path: foundation/attributescopes
---

# AttributeScopes

Collections of attributes that system frameworks define.

## Declaration

```swift
@frozen enum AttributeScopes
```

## Overview

Overview Attribute scopes define groups of attributes appropriate for use with attributed strings in a certain domain. Attribute definitions contain a name, value type, and encode/decode methods to support serialization. For example, the AttributeScopes.FoundationAttributes scope provides an attribute type for a link to a URL, AttributeScopes.FoundationAttributes.LinkAttribute, along with a property to access this type, link. Because AttributeScopes.FoundationAttributes implements AttributeDynamicLookup, you can access the link attribute by name, as this example shows: var attrStr = AttributedString("Example site") attrStr.link = URL(string: "http://example.com")

## Topics

### Foundation-Defined Attributes

- [foundation](foundation/attributescopes/foundation.md)
- [AttributeScopes.FoundationAttributes](foundation/attributescopes/foundationattributes.md)

### SwiftUI-Defined Attributes

- [swiftUI](foundation/attributescopes/swiftui.md)
- [AttributeScopes.SwiftUIAttributes](foundation/attributescopes/swiftuiattributes.md)

### UIKit-Defined Attributes

- [uiKit](foundation/attributescopes/uikit.md)
- [AttributeScopes.UIKitAttributes](foundation/attributescopes/uikitattributes.md)

### AppKit-Defined Attributes

- [appKit](foundation/attributescopes/appkit.md)
- [AttributeScopes.AppKitAttributes](foundation/attributescopes/appkitattributes.md)

### Translation-Defined Attributes

- [translation](foundation/attributescopes/translation.md)
- [AttributeScopes.TranslationAttributes](foundation/attributescopes/translationattributes.md)

### Structures

- [AttributeScopes.AccessibilityAttributes](foundation/attributescopes/accessibilityattributes.md)
- [AttributeScopes.CoreTextAttributes](foundation/attributescopes/coretextattributes.md)
- [AttributeScopes.SpeechAttributes](foundation/attributescopes/speechattributes.md)

### Instance Properties

- [accessibility](foundation/attributescopes/accessibility.md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Copyable](swift/copyable.md)

## See Also

### Using Defined Attributes

- [AttributeDynamicLookup](foundation/attributedynamiclookup.md)
- [ScopedAttributeContainer](foundation/scopedattributecontainer.md)
