<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/AttributeScopes/FoundationAttributes/LinkAttribute",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation15AttributeScopesO0A10AttributesV04LinkB0O"
  },
  "title" : "AttributeScopes.FoundationAttributes.LinkAttribute"
}
-->

# AttributeScopes.FoundationAttributes.LinkAttribute

A type for using a link as an attribute.

```
@frozen enum LinkAttribute
```

## Topics

### Accessing the Attribute Name and Value

[`name`](/documentation/Foundation/AttributeScopes/FoundationAttributes/LinkAttribute/name)

The name of the link attribute.

[`value(for:)`](/documentation/Foundation/AttributeScopes/FoundationAttributes/LinkAttribute/value(for:))

Returns the URL value of the specified object.

[`Value`](/documentation/Foundation/AttributeScopes/FoundationAttributes/LinkAttribute/Value)

The type of the link attribute’s value.

[`objectiveCValue(for:)`](/documentation/Foundation/AttributeScopes/FoundationAttributes/LinkAttribute/objectiveCValue(for:))

Returns an object for a specified URL value.

[`ObjectiveCValue`](/documentation/Foundation/AttributeScopes/FoundationAttributes/LinkAttribute/ObjectiveCValue)

The type of the link attribute’s value when calling it from Objective-C.

## Relationships

### Conforms To

[`AttributedStringKey`](/documentation/Foundation/AttributedStringKey)

[`Copyable`](/documentation/Swift/Copyable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`EncodableAttributedStringKey`](/documentation/Foundation/EncodableAttributedStringKey)

[`Escapable`](/documentation/Swift/Escapable)

[`DecodableAttributedStringKey`](/documentation/Foundation/DecodableAttributedStringKey)

[`ObjectiveCConvertibleAttributedStringKey`](/documentation/Foundation/ObjectiveCConvertibleAttributedStringKey)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

---

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)