<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSDraggingImageComponent",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSDraggingImageComponent"
  },
  "title" : "NSDraggingImageComponent"
}
-->

# NSDraggingImageComponent

A single object in a dragging item.

```
class NSDraggingImageComponent
```

## Overview

An array of [`NSDraggingImageComponent`](/documentation/AppKit/NSDraggingImageComponent) instances are composited together to create the dragging image for an [`NSDraggingItem`](/documentation/AppKit/NSDraggingItem). [`NSDraggingImageComponent`](/documentation/AppKit/NSDraggingImageComponent) instances can simply be considered as named images with a location used by an [`NSDraggingItem`](/documentation/AppKit/NSDraggingItem) instance.

## Topics

### Creating a Dragging Image Component

[`-  initWithKey:`](/documentation/AppKit/NSDraggingImageComponent/init(key:))

Initializes and returns a dragging image component with the specified key.

[`+  draggingImageComponentWithKey:`](/documentation/AppKit/NSDraggingImageComponent/draggingImageComponentWithKey:)

Creates and returns a dragging image component with the specified key.

### Dragging Image Component

[`key`](/documentation/AppKit/NSDraggingImageComponent/key)

The unique name of this image component instance.

### Dragging Image Contents

[`contents`](/documentation/AppKit/NSDraggingImageComponent/contents)

An object providing the image contents of the component.

[`frame`](/documentation/AppKit/NSDraggingImageComponent/frame)

The coordinate space is the bounds of the parent dragging item.

### Constants

[NSDragImage Component Keys](/documentation/AppKit/nsdragimage-component-keys)

These constants are used by the [`init(key:)`](/documentation/AppKit/NSDraggingImageComponent/init(key:)), [`draggingImageComponentWithKey:`](/documentation/AppKit/NSDraggingImageComponent/draggingImageComponentWithKey:) methods and the [`key`](/documentation/AppKit/NSDraggingImageComponent/key) property.

## Relationships

### Conforms To

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

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

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

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

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

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

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)