<!--
{
  "documentType" : "article",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/key-path-expressions",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Key-Path Expressions"
}
-->

# Key-Path Expressions

Use key-path expressions to access properties dynamically.

## Topics

### Key Paths

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

A key path from a specific root type to a specific resulting value type.

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

A partially type-erased key path, from a concrete root type to any
resulting value type.

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

A type-erased key path, from any root type to any resulting value
type.

### Writable Key Paths

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

A key path that supports reading from and writing to the resulting value.

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

A key path that supports reading from and writing to the resulting value
with reference semantics.



---

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)