---
title: AttributeDynamicLookup
framework: foundation
role: symbol
role_heading: Enumeration
path: foundation/attributedynamiclookup
---

# AttributeDynamicLookup

A type to support dynamic member lookup of attributes and containers.

## Declaration

```swift
@dynamicMemberLookup @frozen enum AttributeDynamicLookup
```

## Overview

Overview This type allows attribute owners to add extensions that enable dynamic member lookup access to attributes. Supporting types — including AttributedString, AttributedSubstring, and AttributeContainer — gain dynamic lookup support by extending this type. You can enable dynamic member lookup for your own AttributedStringKey attributes by defining them as implementations, collecting them into an AttributeScope and extending AttributeDynamicLookup, like in the following example: public extension AttributeDynamicLookup {     subscript<T: AttributedStringKey>(dynamicMember keyPath: KeyPath<AttributeScopes.MyFrameworkAttributes, T>) -> T {         return self[T.self]     } }

## Topics

### Accessing Key Values

- [subscript(_:)](foundation/attributedynamiclookup/subscript(_:).md)

### Accessing Framework Attribute Scopes

- [subscript(dynamicMember:)](foundation/attributedynamiclookup/subscript(dynamicmember:)-3nor6.md)
- [subscript(dynamicMember:)](foundation/attributedynamiclookup/subscript(dynamicmember:)-3neai.md)
- [subscript(dynamicMember:)](foundation/attributedynamiclookup/subscript(dynamicmember:)-3q4ap.md)
- [subscript(dynamicMember:)](foundation/attributedynamiclookup/subscript(dynamicmember:)-4yyyo.md)
- [subscript(dynamicMember:)](foundation/attributedynamiclookup/subscript(dynamicmember:)-3v1cn.md)

### Subscripts

- [subscript(dynamicMember:)](foundation/attributedynamiclookup/subscript(dynamicmember:)-30vmv.md)
- [subscript(dynamicMember:)](foundation/attributedynamiclookup/subscript(dynamicmember:)-3ft4y.md)
- [subscript(dynamicMember:)](foundation/attributedynamiclookup/subscript(dynamicmember:)-4n6dp.md)
- [subscript(dynamicMember:)](foundation/attributedynamiclookup/subscript(dynamicmember:)-7vcf2.md)

## Relationships

### Conforms To

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

## See Also

### Using Defined Attributes

- [AttributeScopes](foundation/attributescopes.md)
- [ScopedAttributeContainer](foundation/scopedattributecontainer.md)
