<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "InputMethodKit",
  "identifier" : "/documentation/InputMethodKit/IMKInputController/compositionAttributes(at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "InputMethodKit"
    ],
    "preciseIdentifier" : "c:objc(cs)IMKInputController(im)compositionAttributesAtRange:"
  },
  "title" : "compositionAttributes(at:)"
}
-->

# compositionAttributes(at:)

Returns a dictionary of text attributes.

```
func compositionAttributes(at range: NSRange) -> NSMutableDictionary!
```

## Parameters

`range`

The range of text whose attributes you want to obtain.

## Return Value

The dictionary of text attributes. The default implementation returns an empty dictionary.

---

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)